We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexSuggestions & BugsSoftware Bugs › loadImage
Page Index Toggle Pages: 1
loadImage (Read 1953 times)
loadImage
Sep 18th, 2006, 5:18am
 
I can't seem to be able to load an image in any format from my exported applet. Loading the image (added to the project) works fine when running in processing, but fails when I export to an applet. (I don't see the image file there in the applet directory, which surprises me, but the error is the same if I put the file in the applet directory.)

I've tried jpg or png but get different errors. e.g. in png I'm told that the filter number is invalid (I think it was 254) I wrote my png with no filter (using irfanview's option) and was told thefilter was invalid (number 96 I think)

With JPEG I get the following in the console of my browser (either Mozilla or IE) (below) With TGA, I'm told the format is invalid, but the only export option I get (with GIMP- there are none in irfanview) is to make it uncompressed.

I'd file this as a bug, but wasn't sure this isn't already in there as there are bugs about image reading/writing...

Andrew


java.lang.reflect.InvocationTargetException

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at processing.core.PApplet.loadImageIO(PApplet.java:3135)

at processing.core.PApplet.loadImage(PApplet.java:3068)

at inchwords.setup(inchwords.java:30)

at processing.core.PApplet.handleDisplay(PApplet.java:1269)

at processing.core.PGraphics.requestDisplay(PGraphics.java:535)

at processing.core.PApplet.run(PApplet.java:1152)

at java.lang.Thread.run(Unknown Source)

Caused by: javax.imageio.IIOException: Invalid JPEG file structure: two SOI markers

at com.sun.imageio.plugins.jpeg.JPEGImageReader.readImageHeader(Native Method)

at com.sun.imageio.plugins.jpeg.JPEGImageReader.readNativeHeader(Unknown Source)

at com.sun.imageio.plugins.jpeg.JPEGImageReader.checkTablesOnly(Unknown Source)

at com.sun.imageio.plugins.jpeg.JPEGImageReader.gotoImage(Unknown Source)

at com.sun.imageio.plugins.jpeg.JPEGImageReader.readHeader(Unknown Source)

at com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(Unknown Source)

at com.sun.imageio.plugins.jpeg.JPEGImageReader.read(Unknown Source)

at javax.imageio.ImageIO.read(Unknown Source)

at javax.imageio.ImageIO.read(Unknown Source)
Re: loadImage
Reply #1 - Sep 18th, 2006, 1:50pm
 
is there a different version of java being used within the browser than what's included with processing?
Re: loadImage
Reply #2 - Sep 24th, 2006, 5:30pm
 
on a closer look, that's not our bug so i'm closing the thread. either it's javax.imageio that cannot read the image format, in which case you'd need to file a bug with sun; or it's your app that's producing incompatible image files.
Page Index Toggle Pages: 1