Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 210179

Summary: Be able to choose screenshot file format
Product: z_Archived Reporter: Willian Mitsuda <wmitsuda>
Component: MylynAssignee: Steffen Pingel <steffen.pingel>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: remy.suen, steffen.pingel
Version: devKeywords: helpwanted
Target Milestone: 3.0   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Willian Mitsuda CLA 2007-11-17 16:11:37 EST
Actually, the screenshots submitted by Mylyn have a noticeable color loss, and pixel degradation.

I guess this is because of the conversion to jpeg format. SWT 3.3 introduced support for writting in PNG format.

I propose to change the file format from jpeg to png to get better images (need to be tested).
Comment 1 Remy Suen CLA 2007-11-17 16:59:15 EST
(In reply to comment #0)
> I propose to change the file format from jpeg to png to get better images (need
> to be tested).

Or at least let people pick. I often save and upload jpeg images because the quality does not really matter to my audience as long as the information is conveyed. I'm not going to waste both the server's and my own bandwidth to transfer a lossless image file when a lossy one would suffice.
Comment 2 Willian Mitsuda CLA 2007-11-19 01:03:36 EST
 (In reply to comment #1)
> (In reply to comment #0)
> Or at least let people pick. I often save and upload jpeg images because the
> quality does not really matter to my audience as long as the information is
> conveyed. I'm not going to waste both the server's and my own bandwidth to
> transfer a lossless image file when a lossy one would suffice.

Remy, this is not entirely true. PNG images are compressed too, but either PNG and JPEG serves as different purposes.

For example, I just made a test saving a screenshot of my Eclipse workbench, with a Java editor and normal views opened. Used the ImageLoader class from SWT in this test:

JPEG: 358KB
PNG: 228KB

Did you see? In this case, not only PNG preserves the original image, but is lesser is size!

However, when I capture my desktop with a detailed background and a lot of icons, the result is different:

JPEG: 130KB
PNG: 260KB

Some tests on web pages; the size difference is not very much: Mylyn homepage in firefox:

JPEG: 245KB
PNG: 261KB

http://www.uol.com.br in Firefox:

JPEG: 300KB
PNG: 305KB

Having said that, I think it is worth to let the format configurable. I suppose (I'm not a expert in this subject) PNG may be better for capturing software screenshots when usually there aren't detailed images, and even on web page screenshots, the difference is not very much.
Comment 3 Eugene Kuleshov CLA 2007-11-19 01:20:00 EST
We can use "content type" dropdown to select what format should be saved to.

BTW, using ImageLoader to convert image to png it takes 3 times as long comparing to jpg.
Comment 4 Remy Suen CLA 2007-11-19 01:24:13 EST
(In reply to comment #2)
> Remy, this is not entirely true. PNG images are compressed too, but either PNG
> and JPEG serves as different purposes.

Oh yes, I'm well aware that PNG images are compressed. It's a lossless compression scheme similar to audio codecs like FLAC or APE.

Can a consumer tweak the quality settings within the SWT API? As one can imagine, a reduction in quality helps drop the size of jpeg files quite a bit. When I mentioned the saving and of images in comment 1, I meant using an image manipulation program like the GIMP.
Comment 5 Eugene Kuleshov CLA 2007-11-19 03:40:17 EST
(In reply to comment #4)
> Can a consumer tweak the quality settings within the SWT API?

ImageLoader.save() doesn't have any options to tweak. I don't know if there is any other api in SWT to save images
Comment 6 Mik Kersten CLA 2007-11-23 17:58:36 EST
+1 for figuring out some way to improve on the current low JPEG quality.  If we do a single format my preference would be PNG because the true color, lack of loss and file sizes close to GIF for typical screnshots works very well.
Comment 7 Steffen Pingel CLA 2009-08-19 21:39:52 EDT
The wizard uses the loss-less PNG format now.