0
imageIOを使用してgifをjpegに変換しようとしていますが、結果の画像はピンク色です...誰でも手助けできますか?ImageIO:gif to jpegの問題 - >画像がピンクになる
public byte[] convert(byte[] bytes)
throws Exception {
ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
BufferedImage bufferedImage = ImageIO.read(inputStream);
ByteArrayOutputStream osByteArray = new ByteArrayOutputStream();
ImageOutputStream outputStream = ImageIO.createImageOutputStream(osByteArray);
ImageIO.write(bufferedImage, "jpg", outputStream);
outputStream.flush();
outputStream.close();
return osByteArray.toByteArray();
}
関連項目:http://stackoverflow.com/questions/4386446/problem-using-imageio-write-jpg-file – finnw