Get the 2-D image.
Get the 2-D image.
The image is represented as a 2-D array where each pixel at (column,row) contains the RGB colour value for that pixel. The RGB value is stored as a 32-bit Integer value, taking the form:
(MSB) TTTT TTTT RRRR RRRR GGGG GGGG BBBB BBBB (LSB)
where MSB
is the most significant bit, LSB
the least significant bit, T/R/G/B
are 8-bit representations of the Transparency, Red, Green, and Blue colour values
respectively.
For example, an RGB value of 0x000000FF
(hexadecimal base) corresponds to colour blue:
(MSB) TTTT TTTT RRRR RRRR GGGG GGGG BBBB BBBB (LSB) 0000 0000 0000 0000 0000 0000 1111 1111
A 2-D array of pixel RGB values representing the image
The image height.
Save the image to file.
Save the image to file.
The image is represented as a 2-D array where each pixel at (column,row) contains the RGB colour value for that pixel. The RGB value is stored as a 32-bit Integer value, taking the form:
(MSB) TTTT TTTT RRRR RRRR GGGG GGGG BBBB BBBB (LSB)
where MSB
is the most significant bit, LSB
the least significant bit, T/R/G/B
are 8-bit representations of the Transparency, Red, Green, and Blue colour values
respectively.
The image file name must contain the file type extension for the image to be saved correctly:
var fileNameWRONG : String = "myTestImage"; var fileName : String = "myTestImage.png";
The path where to save the image file
True upon completion
if the given filename is null
IOExceptionif the image cannot be found at the specified path
Convert the 2-D array of pixel RGB values representing the image into a pretty printable string.
Convert the 2-D array of pixel RGB values representing the image into a pretty printable string.
The array printout is formatted as:
[ [1, 2, 3], [3, 4, 5], [6, 7, 8] ]
The image width.
Image Wrapper
The ImageWrapper represents a wrapper class for java image objects.
The image is represented as a 2-D array where each pixel at (column,row) contains the RGB colour value for that pixel. The RGB value is stored as a 32-bit Integer value, taking the form:
where
MSB
is the most significant bit,LSB
the least significant bit, T/R/G/B are 8-bit representations of the Transparency, Red, Green, and Blue colour values respectively.For example, an RGB value of
0x000000FF
(hexadecimal base) corresponds to colour blue:For more information about the RGB color model see the dedicated Wikipedia page on the topic.
Example Use