HighTechTalks DotNet Forums  

jpeg encoder

Dotnet Framework (Drawing) microsoft.public.dotnet.framework.drawing


Discuss jpeg encoder in the Dotnet Framework (Drawing) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
butch77@web.de
 
Posts: n/a

Default jpeg encoder - 10-28-2007 , 09:06 PM






Hi!
I'm compressing jpgs with C# in the standard way, and I had to
realize, that the quality is pretty poor.
I'd like to switch to a 4:4:4 compression (Y:U:V)
I couldn't find anything on the web to change the standard encoder to
do that. Is there any other dotNet library that I can use to encode my
jpegs?

Thanks!


Reply With Quote
  #2  
Old   
Michael C
 
Posts: n/a

Default Re: jpeg encoder - 10-29-2007 , 12:44 AM






<butch77 (AT) web (DOT) de> wrote

Quote:
Hi!
I'm compressing jpgs with C# in the standard way, and I had to
realize, that the quality is pretty poor.
I'd like to switch to a 4:4:4 compression (Y:U:V)
I couldn't find anything on the web to change the standard encoder to
do that. Is there any other dotNet library that I can use to encode my
jpegs?
You can change the quality. Have a look in help, or search google on
EncoderParameter and Encoder.Quality. I can't remember the exact code but it
is not complicated. The thing to be careful of is that you have to pass the
quality in as a Long, not an int otherwise it will fail silently.

Michael




Reply With Quote
  #3  
Old   
Bob Powell [MVP]
 
Posts: n/a

Default Re: jpeg encoder - 10-29-2007 , 01:09 PM



As Michael points out the quality is modifiable but this only acts on the
compression ratio.

To more specifically answer your question, unfortunately you can only save
to the same basic JPEG format. The encoders will read some of the more
esoteric formats including CMYK but saving to them is not possible.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


<butch77 (AT) web (DOT) de> wrote

Quote:
Hi!
I'm compressing jpgs with C# in the standard way, and I had to
realize, that the quality is pretty poor.
I'd like to switch to a 4:4:4 compression (Y:U:V)
I couldn't find anything on the web to change the standard encoder to
do that. Is there any other dotNet library that I can use to encode my
jpegs?

Thanks!



Reply With Quote
  #4  
Old   
butch77@web.de
 
Posts: n/a

Default Re: jpeg encoder - 11-06-2007 , 09:09 PM



On Oct 30, 5:09 am, "Bob Powell [MVP]" <b... (AT) spamkillerbobpowell (DOT) net>
wrote:
Quote:
As Michael points out the quality is modifiable but this only acts on the
compression ratio.

To more specifically answer your question, unfortunately you can only save
to the same basic JPEG format. The encoders will read some of the more
esoteric formats including CMYK but saving to them is not possible.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consultinghttp://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Trickshttp://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQhttp://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

butc... (AT) web (DOT) de> wrote in message

news:1193623618.957177.229820 (AT) v23g2000prn (DOT) googlegroups.com...

Hi!
I'm compressing jpgs with C# in the standard way, and I had to
realize, that the quality is pretty poor.
I'd like to switch to a 4:4:4 compression (Y:U:V)
I couldn't find anything on the web to change the standard encoder to
do that. Is there any other dotNet library that I can use to encode my
jpegs?

Thanks!

So Is there any good third party library, where you cab choose more
options for saving JPEGs?



Reply With Quote
  #5  
Old   
Bob Powell [MVP]
 
Posts: n/a

Default Re: jpeg encoder - 11-07-2007 , 04:11 PM



To be honest I only concern myself with MS technologies.

Michael, any suggestions?

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





butch77 (AT) web (DOT) de wrote:
Quote:
On Oct 30, 5:09 am, "Bob Powell [MVP]" <b... (AT) spamkillerbobpowell (DOT) net
wrote:
As Michael points out the quality is modifiable but this only acts on the
compression ratio.

To more specifically answer your question, unfortunately you can only save
to the same basic JPEG format. The encoders will read some of the more
esoteric formats including CMYK but saving to them is not possible.

--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consultinghttp://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Trickshttp://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQhttp://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

butc... (AT) web (DOT) de> wrote in message

news:1193623618.957177.229820 (AT) v23g2000prn (DOT) googlegroups.com...

Hi!
I'm compressing jpgs with C# in the standard way, and I had to
realize, that the quality is pretty poor.
I'd like to switch to a 4:4:4 compression (Y:U:V)
I couldn't find anything on the web to change the standard encoder to
do that. Is there any other dotNet library that I can use to encode my
jpegs?
Thanks!


So Is there any good third party library, where you cab choose more
options for saving JPEGs?


Reply With Quote
  #6  
Old   
Michael C
 
Posts: n/a

Default Re: jpeg encoder - 11-07-2007 , 06:09 PM



"Bob Powell [MVP]" <bob (AT) _spamkiller_bobpowell (DOT) net> wrote

Quote:
To be honest I only concern myself with MS technologies.

Michael, any suggestions?
I'm the same, I was tempted to use third party tools but ended up doing
everything myself. Leadtools has a dot net library that I'm sure would give
you greater functionality.

Michael




Reply With Quote
  #7  
Old   
Michael C
 
Posts: n/a

Default Re: jpeg encoder - 11-07-2007 , 06:17 PM



"Bob Powell [MVP]" <bob (AT) _spamkiller_bobpowell (DOT) net> wrote

Quote:
To be honest I only concern myself with MS technologies.

Michael, any suggestions?
I should add that when I needed some imaging functionality that dot net
didn't support (eg Twain) I searched google which usually lead me to samples
at code project. Most of the time the samples were fairly incomplete but a
great starting point. It's quite possible that GDI+ supports the compression
required by Butch77 but is not exposed by dot net. Although with the time I
spent it's likely that the cheaper option would have been third party tools,
but they are not always perfect either.

Michael




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.