all groups > dotnet compact framework > january 2008 >
You're in the

dotnet compact framework

group:

JPG compression


JPG compression Broeden
1/29/2008 4:52:07 AM
dotnet compact framework:
Hi,

I have a question about the JPG compression in CF2.0

I tested to load a jpg-image of about 2Mb into a bitmap, and the then
save it at once. The saved image is of only 600kB.

bmpMap = new Bitmap("Test.jpg");
bmpMap.Save"Test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg);

Is there a fixed compression rate when saving to JPG, or can it be
adjusted?

Re: JPG compression Broeden
1/29/2008 6:33:13 AM
[quoted text, click to view]

Is this fixed compression ratio documented someware?

Re: JPG compression ctacke/
1/29/2008 7:53:41 AM
It's not adjustable.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com


[quoted text, click to view]

Re: JPG compression Broeden
1/29/2008 8:12:16 AM
[quoted text, click to view]

I thought there might be a compression ratio adjustment like in many
picture editing software's

see http://www.mdash.net/examples/jpeg_gif.php

Re: JPG compression ctacke/
1/29/2008 8:47:15 AM
there isn't a "fixed ratio". The compression rate depends on the source
data, just like with most compression algorithms. If you want a better
compression rate, try a couple other formats. FOr example, if the images
have large blocks of the same color (like a screen shot) then GIF is far
better than JPG for compression.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com


[quoted text, click to view]

Re: JPG compression ctacke/
1/29/2008 12:42:03 PM
Nope, the CF has no way to adjust the ratio.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com


[quoted text, click to view]

AddThis Social Bookmark Button