I have a bitmap that I want to convert to a jpg. I do this with the
following code:
oBitmap.Save("c:\\pic\\test.jpg",System.Drawing.Imaging.ImageFormat.Jpeg);
The bmp file from which I created my bitmap object weighed in around
380k. Oddly enough, the jpg created from the above bit of code is also
about 380k. Call me crazy, but it seems to me that saving to jpg format
really ought to lower the size of the resulting image file.
Is it not really saving in jpg format, or is the .NET framework's jpg
scheme just not terribly efficient? Is there a way that I can have finer
control over the output size (perhaps by controlling the output quality)?
Thanks.
Found the answer in the drawing group...
When you are using the bitmap, I believe it is storing the information
in 32 bits per pixel. While I know that JPGs use compression, I believe
that it is trying to store 32 bits of information per pixel (or at least
compress that much) compared to the typical 8 bits per pixel which is
expected by most formats (gif, jpg, etc, etc).
I'm not sure if that is the issue, but I hope it helps.
--
- Nicholas Paldino [.NET MVP]
- nicholas...@exisconsulting.com
"I Am Cup [NOT an MVP]" <iam...@thetable.com> wrote in message
news:3D2F2109...@thetable.com...