Summary: | Image encoders should support various depths | ||
---|---|---|---|
Product: | [Eclipse Project] Platform | Reporter: | Christophe Cornu <christophe.cornu+eclipse> |
Component: | SWT | Assignee: | Platform-SWT-Inbox <platform-swt-inbox> |
Status: | NEW --- | QA Contact: | |
Severity: | enhancement | ||
Priority: | P3 | CC: | akurtakov, as, bogofilter+eclipse.org, bso, Carolyn_MacLeod, clin, eclipseBugs, gunnar, junk, krzysztof.michalski, li-te_cheng, mwfoxhoven, pagew2000, peter, sikkar, Silenio_Quarti |
Version: | 3.0 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All | ||
See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=545679 | ||
Whiteboard: |
Description
Christophe Cornu
2003-05-29 09:15:28 EDT
Do I understand correctly that this bug was split off from Bug 38186, and that voting for this bug will allow people to save images as GIF files? Saving an ImageData as a GIF is expected to work if your image data is of bit depth 1, 4 or 8. If you wish to be able to save into GIF an image with a different bit depth, yes you can vote for this PR. ICO probably needs to handle more depths also. Here's the current depths handled: boolean isValidIcon(ImageData i) { if (!((i.depth == 1) || (i.depth == 4) || (i.depth == 8))) return false; int size = i.palette.colors.length; return ((size == 2) || (size == 16) || (size == 32) || (size == 256)); } *** Bug 120722 has been marked as a duplicate of this bug. *** Also, from the newsgroup: [Eclipse 3.2M3, gtk] Snippet194 (write an animated gif) throws with message "Unsupported color depth" under linux. This is because the return value from Image.getImageData() is always 24-bit-direct, since Image.init() blits the 4-bit indexed data into 24-bit direct data. *** Bug 168071 has been marked as a duplicate of this bug. *** I see the same behavior as comment #5 on MacOS X Even though I'm creating an Image using Indexed (isDirect == false) ImageData with a depth of 4 (or 8), the image created always has a depth of 32 and is direct, due to the Image.init() blit call, resulting in "unsupported color depth" errors when using ImageLoader.save Can you verify whether or not this will be addressed as part of the Linux-GTK duplicate bug so.... is there a solution for this problem? i'm trying to create some ImageData instances and put them into an array for the imageLoader instance, and it still gives me the depth error. i do not want that the ImageData instances will be restricted to a very few number of colors... please help. The issue still exists on E4.10, can it be fixed? We have lots of TIFF images getting this error! Do you mind trying on Gtk with latest version? SWT now uses the gdkpixbuf library which has far better and broader support. |