PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 5:55 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Dec 05, 2009 6:15 am 
Offline

Joined: Sat Dec 05, 2009 6:06 am
Posts: 2
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!


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 07, 2009 12:12 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Dec 07, 2009 1:16 pm 
Offline

Joined: Sat Dec 05, 2009 6:06 am
Posts: 2
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 4546 times ]
Top
 Profile  
Reply with quote  
PostPosted: Thu Dec 10, 2009 9:07 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 346 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group