Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
the following code in an ASP.NET website works fine when i run the website in visual studio


C#
FileInfo info = new FileInfo(myFilePath);
using(Stream docStream = info.Open(FileMode.Open, FileAccess.Read,     FileShare.None) )
{
   TiffBitmapDecoder decoder = new TiffBitmapDecoder(docStream ,     BitmapCreateOptions.None , BitmapCacheOption.Default)

   int frame_count = decoder.Frames.Count;
...
...
}


but when i deploy the website on IIS, .NetFramework 4, and call the webpage from the browser, the property call : (decoder.Frames) throws an exception: Pixel format not supported,

for the same exact tiff image being read from the same exact location.

I also created a test WinForms app, with the same piece of code to test it. the application worked well on my machine, but when i copied exe file to the server and ran it, it gave the same exception for the same image at the same statement.

What I have tried:

i posted the question somewhere else, and someone answered me that some subtypes of tiff are supported on some operating systems but not on others.
My code worked on Windows XP, but not on Windows 7 or Windows server 2008.

Is there a solution? or maybe a converter between subtypes of tiff?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900