Bug 290164 - [Image Loading] ImageLoader cannot load JPEG files with CMYK color model
Summary: [Image Loading] ImageLoader cannot load JPEG files with CMYK color model
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4.1   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact: Carolyn MacLeod CLA
URL:
Whiteboard: stalebug
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2009-09-22 14:20 EDT by Mark McLaren CLA
Modified: 2020-05-06 17:34 EDT (History)
1 user (show)

See Also:


Attachments
An example CMYK image (14.81 KB, image/jpeg)
2009-09-22 14:22 EDT, Mark McLaren CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark McLaren CLA 2009-09-22 14:20:17 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 GTB5 (.NET CLR 3.5.30729)
Build Identifier: Using: org.eclipse.swt.win32.win32.x86_3.5.0.v3550b.jar

ImageLoader throws an exception if jpeg file uses CYMK color model.  See below for example snippet.

Reproducible: Always

Steps to Reproduce:
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.ImageLoader;

public class TestCmyk {
	public static void main(String[] args) {

		ImageLoader inLoader = new ImageLoader();
		ImageData[] result = inLoader.load("c:\\temp\\cmyk-example.jpg");
		System.out.println(result[0].width);
	}

}
Comment 1 Mark McLaren CLA 2009-09-22 14:22:43 EDT
Created attachment 147819 [details]
An example CMYK image

Attaching the jpeg file used by the description snippet
Comment 2 Carolyn MacLeod CLA 2011-10-04 17:26:55 EDT
Note that you can load a CMYK Image natively, using Image constructor, but you can't load a CMYK jpeg from stream or use ImageData constructor (which is what ImageLoaded uses). Hopefully, this partial solution will be useful to you.
Comment 3 Leo Ufimtsev CLA 2017-08-03 12:32:54 EDT
This is a one-off bulk update. (The last one in the triage migration).

Moving bugs from swt-triaged@eclipse to platform-swt-inbox@eclipse.org and adding "triaged" keyword as per new triage process:
https://wiki.eclipse.org/SWT/Devel/Triage

See Bug 518478 for details.

Tag for notification/mail filters:
@TriageBulkUpdate
Comment 4 Eclipse Genie CLA 2020-05-06 17:34:18 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.