|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.data.MemoryByteChannelImage
net.sourceforge.jiu.data.MemoryPaletted8Image
This class stores a paletted image with one byte per sample in memory.
ByteChannelImage
,
IntegerImage
,
Palette
Constructor Summary | |
MemoryPaletted8Image(int width,
int height)
Create an image of byte channels. |
|
MemoryPaletted8Image(int width,
int height,
Palette palette)
|
Method Summary | |
static void |
checkPalette(Palette palette)
|
PixelImage |
createCompatibleImage(int width,
int height)
Creates an instance of the same class as this one, with width and height given by the arguments. |
long |
getAllocatedMemory()
Returns the number of bytes that were dynamically allocated for this image object. |
Class |
getImageType()
If there is a single interface or class that describes the image data type of this class, the Class object associated with that
interface (or class) is returned (or null otherwise).
|
int |
getMaxSample(int channel)
Returns the maximum value for one of the image's channels. |
Palette |
getPalette()
Returns this image's palette. |
String |
getTypeDescription()
|
void |
setPalette(Palette palette)
Sets this image's palette to a new value. |
Methods inherited from class net.sourceforge.jiu.data.MemoryByteChannelImage |
checkPositionAndNumber, clear, clear, clear, clear, createCopy, getBitsPerPixel, getByteSample, getByteSample, getByteSamples, getHeight, getNumChannels, getSample, getSample, getSamples, getWidth, putByteSample, putByteSample, putByteSamples, putSample, putSample, putSamples |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sourceforge.jiu.data.ByteChannelImage |
clear, clear, getByteSample, getByteSample, getByteSamples, putByteSample, putByteSample, putByteSamples |
Methods inherited from interface net.sourceforge.jiu.data.IntegerImage |
clear, clear, getSample, getSample, getSamples, putSample, putSample, putSamples |
Methods inherited from interface net.sourceforge.jiu.data.PixelImage |
createCopy, getBitsPerPixel, getHeight, getNumChannels, getWidth |
Constructor Detail |
public MemoryPaletted8Image(int width, int height)
width * height * numChannels
bytes.
Note that the data will not be initialized, so you should not assume
anything about its content.
width
- the horizontal resolution, must be non-zero and positiveheight
- the vertical resolution, must be non-zero and positive
IllegalArgumentException
- if any of the parameters are smaller than 1public MemoryPaletted8Image(int width, int height, Palette palette)
Method Detail |
public static void checkPalette(Palette palette)
public PixelImage createCompatibleImage(int width, int height)
PixelImage
createCompatibleImage
in interface PixelImage
createCompatibleImage
in class MemoryByteChannelImage
public long getAllocatedMemory()
PixelImage
getAllocatedMemory
in interface PixelImage
getAllocatedMemory
in class MemoryByteChannelImage
public Class getImageType()
PixelImage
Class
object associated with that
interface (or class) is returned (or null
otherwise).
This Class
object, if available for two image objects,
can be used to find out if they are compatible.
Example: MemoryGray8Image
returns
net.sourceforge.jiu.data.Gray8Image.class
.
getImageType
in interface PixelImage
public int getMaxSample(int channel)
IntegerImage
0
.
getMaxSample
in interface IntegerImage
getMaxSample
in class MemoryByteChannelImage
public Palette getPalette()
getPalette
in interface PalettedImage
setPalette(net.sourceforge.jiu.data.Palette)
public String getTypeDescription()
public void setPalette(Palette palette)
setPalette
in interface PalettedImage
palette
- the new palette for this imagegetPalette()
|
JIU 0.12.0 Homepage | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |