AWARE SYSTEMS
TIFF and LibTiff Mail List Archive

Thread

2007.07.27 20:49 "[Tiff] Well, How to create a 200x100dpi Tiff file programmatically?", by mohamad zeinali
2007.07.27 21:05 "Re: [Tiff] Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain
2007.07.28 20:23 "Re: [Tiff] Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain
2007.07.30 08:26 "Re: [Tiff] Well, How to create a 200x100dpi Tiff file programmatically?", by mikk
2007.07.30 12:45 "Re: [Tiff] Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain

2007.07.30 12:45 "Re: [Tiff] Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain

On 30-Jul-07, at 5:26 AM, mikk wrote:

You really do need to RTFM (such as the TIFF spec, along with libtiff documentation).

>> One starting point: http://www.awaresystems.be/imaging/tiff/ >> faq.html#q4

--Toby

The problem is that the spec is not very accurate on that.

The spec has nothing to say about compiler quirks :-)

As I discussed this issue on this mailing list some time ago (May 2007) with Joris, when using Borland compilers you have to pass argument of type Double to set the values for tags TIFFTAG_XRESOULTION and TIFFTAG_YRESOLUTION, although the spec says that these should be passed as float (or Single - the Delphi equivalent).

So, Mohhamad, you have to try to use local variables of type Double as arguments for TIFFSetField.

What also seems to have confused Mohamad is the indirection that TIFF uses for tag values. He seems not to have understood that libtiff abstracts this away, so that he doesn't have worry about offsets; only to specify the values.

But it's not yet clear whether his file is being written with the resolution he intends or not; IMO he should check that with an inspection tool like tiffinfo/tiffdump.

Mohamad, you could also try pasting a code snippet here.

--Toby

>

Hope this helps

Kind regards,