← Back to team overview

openjdk team mailing list archive

Bug#639883: openjdk-6: Can't load standard profile: LINEAR_RGB.pf => Still fails

 

reopen 639883
block 639924 by 639883
thanks

Hello,

Sorry but this bug is not fixed.

Taking the following source code:
--------------------
import java.awt.image.RenderedImage;
import java.awt.image.BufferedImage;
import java.awt.Graphics2D;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;

public class plop {

    public static void main(String args[]) {
        try {
            RenderedImage rendImage = plop.myCreateImage();

            File file = new File("newimage.png");
            ImageIO.write(rendImage, "png", file);

        } catch (IOException e) {
        }
    }
// Returns a generated image.
    public static RenderedImage myCreateImage() {
        int width = 100;
        int height = 100;

        BufferedImage bufferedImage = new BufferedImage(width, height,
BufferedImage.TYPE_INT_RGB);

        Graphics2D g2d = bufferedImage.createGraphics();

        g2d.dispose();

        return bufferedImage;
    }
}
--------------

Built and run:
$ javac plop.java && java plop
Exception in thread "main" java.lang.ExceptionInInitializerError
	at javax.imageio.ImageIO.getWriter(ImageIO.java:1581)
	at javax.imageio.ImageIO.write(ImageIO.java:1510)
	at plop.main(plop.java:15)
Caused by: java.lang.IllegalArgumentException: Can't load standard
profile: GRAY.pf
	at java.awt.color.ICC_Profile$2.run(ICC_Profile.java:912)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.awt.color.ICC_Profile.getStandardProfile(ICC_Profile.java:905)
	at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:876)
	at java.awt.color.ColorSpace.getInstance(ColorSpace.java:333)
	at javax.imageio.ImageTypeSpecifier
$Grayscale.<init>(ImageTypeSpecifier.java:717)
	at
javax.imageio.ImageTypeSpecifier.createGrayscale(ImageTypeSpecifier.java:798)
	at
javax.imageio.ImageTypeSpecifier.<clinit>(ImageTypeSpecifier.java:157)
	... 3 more








Follow ups