MSDOTnet.org Forum Index
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JPG compression

 
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> Compact Framework
Author Message
Broeden



Joined: 08 Aug 2007
Posts: 13

PostPosted: Tue Jan 29, 2008 9:52 am    Post subject: JPG compression Reply with quote

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?

/Broeden

Archived from group: microsoft>public>dotnet>framework>compactframework
Back to top
View user's profile Send private message
user



Joined: 08 Aug 2007
Posts: 286

PostPosted: Tue Jan 29, 2008 12:53 pm    Post subject: Re: JPG compression Reply with quote

It's not adjustable.


--

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


"Broeden" wrote in message @s12g2000prg.googlegroups.com...
> 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?
>
> /Broeden
Back to top
View user's profile Send private message
Broeden



Joined: 08 Aug 2007
Posts: 13

PostPosted: Tue Jan 29, 2008 11:33 am    Post subject: Re: JPG compression Reply with quote

On 29 Jan, 14:53, "" wrote:
> It's not adjustable.

Is this fixed compression ratio documented someware?

/Broeden
Back to top
View user's profile Send private message
user



Joined: 08 Aug 2007
Posts: 286

PostPosted: Tue Jan 29, 2008 1:47 pm    Post subject: Re: JPG compression Reply with quote

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


"Broeden" wrote in message @v67g2000hse.googlegroups.com...
> On 29 Jan, 14:53, "" wrote:
>> It's not adjustable.
>
> Is this fixed compression ratio documented someware?
>
> /Broeden
Back to top
View user's profile Send private message
Broeden



Joined: 08 Aug 2007
Posts: 13

PostPosted: Tue Jan 29, 2008 1:12 pm    Post subject: Re: JPG compression Reply with quote

On 29 Jan, 15:47, "" wrote:
> 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.
>

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

/Broeden
Back to top
View user's profile Send private message
user



Joined: 08 Aug 2007
Posts: 286

PostPosted: Tue Jan 29, 2008 5:42 pm    Post subject: Re: JPG compression Reply with quote

Nope, the CF has no way to adjust the ratio.


--

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


"Broeden" wrote in message @l32g2000hse.googlegroups.com...
> On 29 Jan, 15:47, "" wrote:
>> 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.
>>
>
> 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
>
> /Broeden

Back to top
View user's profile Send private message
Display posts from previous:   
Related Topics:
Compression Before Encryption? Hi! I'm using the 128 bit class in C# to encrypt several kilobytes (30-100 KB) of uncompressed text data. The question I have is: Would it generally make any sense (i.e. performance gain) to compress the text data before I encrypt it and v

Image Compression I am working on an application that deals with multi-page Tiffs. I have a function that given a page will added to the existing M-Tiff. However, I am creating 16MB files for an image with only two frames. I have been using the encoder va

.NET CLR exception when using compression sink Using Ingo Rammer's "Extended .NET Remoting" as my basis, I've added a client-side compression sink after my and a server-side compression sink before my The compression / decompression routines each r

Determining BALLPARK Memory Consumption for Instantiated Obj First of all I realize if I am able to get anything, its not going to be 100% right on. What I'd like to do is get ballpark idea of a instantiated objects memory consumption. I am writing a specialized managed cache, that needs to start attempting to purg

ThreadContext, ThreadException and message loop(pump) From a previous posting, I learnt that the Application class's Run method starts a message loop(pump) on the current thread. But the following findings confuse me. 1. When I look at the message loop code using the .NET reflector, I see a lot of code refer
Post new topic   Reply to topic    MSDOTnet.org Forum Index -> Compact Framework All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group