PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

XImage handling of TIFF F images having y resolution = 98
https://forum.pdfsharp.net/viewtopic.php?f=2&t=972
Page 1 of 1

Author:  audetteb [ Sat Dec 05, 2009 6:15 am ]
Post subject:  XImage handling of TIFF F images having y resolution = 98

It seems that XImage handling of TIFF F images with a Y resolution of 98 are handled incorrectly when determining the image height. According to the TIFF F (fax) spec, the Y resolution can be either 98 or 196.

The code works fine when the resolution of the image is 196, but not when it is 98 (it is approximately half the size that it should be.)

Is there a workaround for this, or perhaps I'm doing something wrong?

Thanks!

Author:  Thomas Hoevel [ Mon Dec 07, 2009 12:12 pm ]
Post subject:  Re: XImage handling of TIFF F images having y resolution = 98

TIFF files are read using operating system functions.

TIFF files using CCITT encoding can have AFAIK any resolution (as long as you don't intend to actually fax them).

Without such an image I cannot test if the XImage class works correctly.

Author:  audetteb [ Mon Dec 07, 2009 1:16 pm ]
Post subject:  Re: XImage handling of TIFF F images having y resolution = 98

Thanks Thomas,

I have attached a sample junk fax for you to test with.

At first glance, it seems to come through OK, but upon further inspection, it is half the height it should be.

I am using Vista... maybe that explains it? :roll:

Bert

Attachments:
Fax00001094.TIF
Fax00001094.TIF [ 68.24 KiB | Viewed 5975 times ]

Author:  Thomas Hoevel [ Thu Dec 10, 2009 9:07 am ]
Post subject:  Re: XImage handling of TIFF F images having y resolution = 98

I tried it under XP.

Inserted that fax into our application and it came up with a width of 16 cm and a height of 21.xy cm.
(16 cm is a limit of our application, 21 cm paper width with 2.5 cm page margin.)
Bitmap shows DpiX = 204 and DpiY = 98.
Aspect ratio is correct.

I haven't tried Vista yet.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/