> memStream.Write(imgByte, 0 , imgByte.Length);
The above statement positions the stream pointer at the
end of the image.
Try setting the stream pointer to the beginning of the
image before calling System.Drawing.Image.FromStream(memStream);
>I have asp.net code using C# that will convert tif file into jpg and then
>it
[quoted text clipped - 28 lines]
> machine and it worked on test machine previously. I appreciate any help to
> resolve this problem. Thanks
Peter - 26 Oct 2005 14:18 GMT
I have put the statment to set the position of stream at 0 without any
effect. I read on microsoft web site that there is a bug in GDI+ that causes
the mentioned error. GDI+ cannot handle 24 bits and 16 bits tif files. I have
4 bits gray scale tif image. Any idea? Thanks
> > memStream.Write(imgByte, 0 , imgByte.Length);
>
[quoted text clipped - 36 lines]
> > machine and it worked on test machine previously. I appreciate any help to
> > resolve this problem. Thanks
Michael Phillips, Jr. - 26 Oct 2005 15:39 GMT
I tried loading 4bpp, 16bpp and 24bpp grayscale tiff files and converted
them without error to jpeg images.
You can not use the same stream that you loaded the tiff files
to save the jpeg files. They must be separate streams.
>I have put the statment to set the position of stream at 0 without any
> effect. I read on microsoft web site that there is a bug in GDI+ that
[quoted text clipped - 48 lines]
>> > to
>> > resolve this problem. Thanks