First I used SSRS to render a TIFF document and found out although it is possible to pass colour depth parameter to SSRS 2005 or 2008, it discards it and always generates a 24bpp file. Without luck, got this 24bpp file generated by SSRS render method, loaded it on a System.Drawing.Bitmap object and successfully scaled it to 1728 pixels by 2347 pixels at 204dpi by 196dpi (11.50 inches by 8.82 inches), but failed when drawing it to a new monochrome (bitonal) System.Drawing.Bitmap object. .Net accepts creating 1bpp indexed files, but no color depth conversion supplied, so I had to code a custom c# function to achieve it. After scaling, changing resolution and changing colour depth, I saved the System.Drawing.Bitmap object to a file and found out tag 254 (NewSubfileType) had invalid value 0 instead of 2 (FILETYPE_PAGE), tag 266 (FillOrder) was missing and Bitmap content was spread across multiple strips. Looked around Encoder and EncoderParameters and found no way of changing Bitmap Save and SaveAdd methods so that they yield a file in the correct format (tiff-f) I need. Now, tired of System.Drawing + GDI+, found out about this System.Windows.Media.Imaging. Is it also plagued by GDI+ or uses new DirectX technology and may let me drive it in a way to easily produce a compliant tiff-f file?
+1
A:
Try running Reflector on that assembly and drilling down into that code to find out. You can also setup your Visual Studio to allow you to step through the .NET source in the debugger as you execute that code.
legalize
2009-07-19 15:57:35