reading bmp in java 1.4.2

Hello i have pb for reading bmp files as ImageIO.read does not support this format. How can i do ?Thank you.
[122 byte] By [JusteUneQuestiona] at [2007-11-27 7:42:43]
# 1

and here is my code, i have to return a byte array from image file. Image can be png, gif, jpeg and bmp.

i tried for gif but doesnt show any image on my screen.

try

{

try

{

if (extension.equalsIgnoreCase("bmp"))

{

}

else

{

bufImage = ImageIO.read(new File(nomFichierDemande));

baos = new ByteArrayOutputStream();

ImageIO.write(bufImage, extension, baos);

resultImage = baos.toByteArray();

}

}

finally

{

baos.flush();

baos.close();

}

}

catch (IOException e)

{

System.out.println("probleme lors de lecture de l'image");

e.printStackTrace();

}

return resultImage;

JusteUneQuestiona at 2007-7-12 19:23:37 > top of Java-index,Security,Cryptography...