[JAVA2D] BufferedImage.TYPE_USHORT_GRAY

2000-09-05 Thread Ted Hill
Hello, I am working with gray scale images and create them as TYPE_USHORT_GRAY. The doc for BufferedImage.TYPE_USHORT_GRAY says "Represents an unsigned short grayscale image" I'm a bit puzzled by this because I thought the Java short was signed only (-2^15 to 2^15 -1). My questions are:

Re: [JAVA2D] BufferedImage.TYPE_USHORT_GRAY

2000-09-05 Thread Jim Graham
What is actually used to represent an "unsigned short" in the DataBuffer? What is the upper limit gray scale value? The data values are stored in an array of shorts and are "interpretted" as unsigned. This is the same way that we deal with byte array data for ByteIndexed images. When you