troubleshooting Question

Wrong image dimensions (Tiff file), a bug maybe ?

Avatar of Mas-Tool
Mas-Tool asked on
.NET ProgrammingEditors IDEs
11 Comments1 Solution2051 ViewsLast Modified:
I'm trying to split a multi page tiff file into separate images.
The tiff file i have was made with windows fax, and it contains 2 pages.
The problem is that if the tiff resolution is 204x98 and i check for it's dimensions i get a wrong height.
the height i get is HALF the actual size ! (when i check with ACDSee i see the right dimension).

(when i try to add a picturebox to a form and set the image to the tif file, i see it stretched because of the wrong size, even though ACDSee display it the right way)

Image img = Image.FromFile("c:\\temp.tif");
MessageBox.Show(img.Width.ToString() + "x" + img.Height.ToString()); //i get a wrong height

the image I'm testing the code with is:

if the sender's fax is set for "Fine" resolution instead of "Half Tone" i get the correct dimensions !
It's driving me crazy,

Please help !
Thanks in advance,

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 11 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros