Issue with JPEG image

I’m testing on Mac OS X 10.4.3 with J2SE 5.0 Release 3 installed and Servoy R2 2.2.3 build-335.
I have a JPEG image that Servoy cannot visualize.
You can download the image from here.
If I try to visualize it, Servoy launches the following exception:

javax.imageio.IIOException: Unsupported Image Type
javax.imageio.IIOException: Unsupported Image Type
	at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:889)
	at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:864)
	at com.servoy.j2db.scripting.JSApplication.createJPGImage(Unknown Source)
	at com.servoy.j2db.scripting.JSApplication.js_createJPGImage(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:347)
	at org.mozilla.javascript.ScriptRuntime.call(ScriptRuntime.java:1254)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2031)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:94)
	at com.servoy.j2db.scripting.e.call(Unknown Source)
	at com.servoy.j2db.develop.debugger.k.a(Unknown Source)
	at com.servoy.j2db.develop.debugger.k.executeFunction(Unknown Source)
	at com.servoy.j2db.FormPanel.a(Unknown Source)
	at com.servoy.j2db.FormPanel.a(Unknown Source)
	at com.servoy.j2db.FormPanel$b.a(Unknown Source)
	at com.servoy.j2db.dataui.DataImgMediaField.do(Unknown Source)
	at com.servoy.j2db.dataui.DataImgMediaField.notifyLastNewValueWasChange(Unknown Source)
	at com.servoy.j2db.dataprocessing.as.commitEdit(Unknown Source)
	at com.servoy.j2db.dataui.v.for(Unknown Source)
	at com.servoy.j2db.dataui.DataImgMediaField.drop(Unknown Source)
	at java.awt.dnd.DropTarget.drop(DropTarget.java:430)
	at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTargetContextPeer.java:500)
	at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextPeer.java:53)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEvent(SunDropTargetContextPeer.java:812)
	at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(SunDropTargetContextPeer.java:736)
	at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
	at java.awt.Component.dispatchEventImpl(Component.java:3892)
	at java.awt.Container.dispatchEventImpl(Container.java:2068)
	at java.awt.Component.dispatchEvent(Component.java:3869)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4256)
	at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:4007)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3861)
	at java.awt.Container.dispatchEventImpl(Container.java:2054)
	at java.awt.Window.dispatchEventImpl(Window.java:1774)
	at java.awt.Component.dispatchEvent(Component.java:3869)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
	at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:275)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:196)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:190)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:182)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
sun.awt.image.ImageFormatException: Unsupported color conversion request
	at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
	at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
sun.awt.image.ImageFormatException: Unsupported color conversion request
	at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
	at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
sun.awt.image.ImageFormatException: Unsupported color conversion request
	at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
	at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
sun.awt.image.ImageFormatException: Unsupported color conversion request
	at sun.awt.image.JPEGImageDecoder.readImage(Native Method)
	at sun.awt.image.JPEGImageDecoder.produceImage(JPEGImageDecoder.java:119)
	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:246)
	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

I see ```
sun.awt.image.ImageFormatException: Unsupported color conversion request

I believed that Servoy could read all type of JPEG images, isn't it true?

Hi Xfox

Got following message when clicked on link in your post - maybe problem is with image rather than Servoy.

The image http://homepage.mac.com/xfox/scritta.jpg cannot be displayed, because it contains errors.

I’m using Firefox 1.5 on Win XP

Graham Greensall
Worxinfo Ltd

I tried to load the image with Mozilla 1.8b, Camino 0.8.4 and Firefox 1.5 on Mac OS X 10.4.3 and I got the same error message, but I found that it’s a Mozilla bug that cannot yet visualize the JPEG images in CMYK color mode.
Opera 8.51 and Omniweb 5.1.3 beta 1 simply don’t show the image.
iCab 3.0.1 (ß379), Safari 2.0.2, Shiira 1.1, Shiira mini 1.1.1 and SunriseBrowser 0.776 show the image without problems.

So it’s definitively not a problem with the JPEG image, I think it’s a lack in the JPEG support of the present Java version.
Could someone of the dev team confirm this?
Can I expect CMYK JPEG support in the short time or should I have to fallback to use only RGB JPEG images?

Note:
To correctly view this message you should switch the text encoding of your browser to UTF-8 (see this thread for more information).

Found the bug in the Java Bug Database:
Bug ID 4924909: Reading a certain JPEG image fails with IIOException
Actually, it’s a request for enhancement.
I just voted for it.
There is a suggested workaround, too, if the Servoy dev team wants to have a look at it.

Seems like CMYK jpegs are still an issue displaying properly.

Is there a fix/enhancement/upgrade anytime soon to the image plugin?

Providence1:
Seems like CMYK jpegs are still an issue displaying properly.

Is there a fix/enhancement/upgrade anytime soon to the image plugin?

Yes, there is a case to support this but not sure when will be fixed. Best thing would be to create a case with your desired enhancement/fix. More demands for a feature tend to make it more urgent.