Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

anyone with experience in Java images, pls help!

6 views
Skip to first unread message

Tennessee Leeuwenburg

unread,
Dec 18, 2000, 11:06:32 PM12/18/00
to
The Error :

java.lang.IllegalArgumentException: Unknown color space
at java.awt.color.ICC_Profile.getInstance(ICC_Profile.java:791)
at ImageReader.makeColorModel(ServDB.java:275)
at ImageReader.makeImage(ServDB.java:211)
at ServDB.main(ServDB.java:73)
Exception in thread "main"
Tool completed with exit code 1


The Code :

// This method retrieves a ColorModel for use in constructing theimage
private static ComponentColorModel makeColorModel() {


ComponentColorModel myModel = new ComponentColorModel(
new ICC_ColorSpace(ICC_Profile.getInstance(ColorSpace.TYPE_3CLR)), // A three-band colorspace
new int[] {8,8,8}, // 8-bit color for each band
false, // Has no alpha value
false, // Alpha value is not premultiplied
java.awt.Transparency.OPAQUE, // The image is opaque
DataBuffer.TYPE_INT); // The type of array data is stored in

return myModel;
}

The Point :

I'm reading in RGB data from a string, and building an image out of it. So I need a color model, and I'm using their inbuilt model for generic
3-color! Help!

-Tennessee

Jon A. Cruz

unread,
Dec 19, 2000, 1:17:04 AM12/19/00
to
Tennessee Leeuwenburg wrote:

> I'm reading in RGB data from a string, and building an image out of it.

Very bad thing there. Pretty much guaranteed to break on you.
See my response to your "Large Strings" post.


0 new messages