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.28 20:23 "Re: Well, How to create a 200x100dpi Tiff file programmatically?", by Toby Thain

On 28-Jul-07, at 5:05 PM, mohamad zeinali wrote:

>
>
>
>
> >
> >
> > On 7/28/07, Toby Thain <toby@smartgames.ca> wrote:
> > On 27-Jul-07, at 5:49 PM, mohamad zeinali wrote:
>
> > How did you check? Resolution is defined by those three tags. That
> comes from working code.
>
> I opened the file using Microsoft Document Imaging and it says that  
> this file has a resolution of 100x100 dpi.

That is almost certainly an issue with the program. It's likely  
taking one value (not looking at both X and Y), and assuming square  
pixels. Try a program such as Photoshop CS2 which does support non- 
square pixels.

You can also try inspecting the TIFF tags with tools provided as part  
of libtiff, to verify that the resolution is correctly encoded. Do  
the same thing for known-good files (e.g. fax files) generated  
elsewhere.

> I've tested any and everything you can imagine! I entered many  
> different values for XRESOLUTION and YRESOLUTION. According to some  
> resources like http://www.asmail.be/msg0055114921.html, the value  
> we enter as XRESOLUTION is just the offset(from the beginning) of  
> real information about resolution. More importantly, inspecting  
> codes like "bmp2tiff" which is available from :
> http://www.torry.net/vcl/graphics/conversion/bmp2tiff.zip
> shows that we should set the value of XRESOLUTION tag as an offset  
> in which we write a combination of two 4-byte values.
> Yet, I don't know how to implement this using LibTiff!

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

> Thanks.
>
>