Have you checked if the image is diferent to the other ones, e.g.
greyscale, or by being tiny like 2x2 pixels?
cheers,
Mathias
--
Dr. Mathias Lux
Assistant Professor, Klagenfurt University, Austria
http://tinyurl.com/mlux-itec
Hi!
This is not a Lire issue testing with the class:
public class Test {
public static void main(String[] args) throws IOException {
BufferedImage img = ImageIO.read(new File("C:\\Temp\\nitc_logo_without_background1.png"));
int[] pixel = new int[3];
img.getRaster().getPixel(1,1,pixel);
System.out.println("pixel.length = " + pixel.length);
}
}
I get the same error
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3
at java.awt.image.ComponentSampleModel.getPixel(ComponentSampleModel.java:702)
at java.awt.image.Raster.getPixel(Raster.java:1522)
at at.juggle.gdx.Test.main(Test.java:19)
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:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Process finished with exit code 1
Java simply can't read the image.
cheers,
Mathias