Class ColourPackedPixArray
java.lang.Object
com.xinapse.image.PixArray
com.xinapse.image.BytePixArray
com.xinapse.image.RGBInterlacedPixArray
com.xinapse.image.ColourPackedPixArray
A representation of an array of (UNC) color packed (r,g,b,a) 4-byte pixels.
Note that all pixel values handled by this class are of the primitive byte class.
However, it is up to the user to convert these to unsigned before the pixel
values are used. This would typically be done using a statements like:
short r = (short) (pixel[4*i] & 0xFF);
short g = (short) (pixel[4*i+1] & 0xFF);
short b = (short) (pixel[4*i+2] & 0xFF);
short a = (short) (pixel[4*i+3] & 0xFF);
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionlongwrite(BufferedOutputStream s, ByteOrder byteOrder) Writes this ColourPackedPixArray object to a BufferedOutputStream.Methods inherited from class RGBInterlacedPixArray
getHisto, getPutPix, writeAsColourPackedMethods inherited from class BytePixArray
getPutPix, getPutSliceMethods inherited from class PixArray
__getPix, copyPix, getInstance, getInstance, getMinMax, newInstance
-
Method Details
-
write
Writes this ColourPackedPixArray object to a BufferedOutputStream. All pixels are written.- Overrides:
writein classBytePixArray- Parameters:
s- the BufferedOutputStream.byteOrder- is ignored.- Returns:
- the number of bytes written.
- Throws:
IOException- if the data cannot be written.
-