AWARE [SYSTEMS] Imaging expertise for the Delphi developer
AWare Systems, Imaging expertise for the Delphi developer, Home TIFF and LibTiff Mailing List Archive

LibTiff Mailing List

TIFF and LibTiff Mailing List Archive
July 2007

Previous Thread
Next Thread

Previous by Thread
Next by Thread

Previous by Date
Next by Date

Contact

The TIFF Mailing List Homepage
This list is run by Frank Warmerdam
Archive maintained by AWare Systems



Valid HTML 4.01!



Thread

2007.07.27 20:49 "Well, How to create a 200x100dpi Tiff file programmatically?", by Mohamad Zeinali
2007.07.27 21:05 "Re: Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain
2007.07.28 20:23 "Re: Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain
2007.07.30 08:26 "Re: Well, How to create a 200x100dpi Tiff file programmatically?", by <mikk@go2.pl>
2007.07.30 12:45 "Re: Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain

2007.07.30 12:45 "Re: 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,
> mikk