public class MIPMappedImage extends ImageMap
PREVIEW_HEIGHT, PREVIEW_WIDTH
Constructor and Description |
---|
MIPMappedImage(java.io.DataInputStream in)
Reconstruct an image from its serialized representation.
|
MIPMappedImage(java.io.DataInputStream in,
short version)
Reconstruct an image from its serialized representation.
|
MIPMappedImage(java.io.File file)
Construct a MIPMappedImage from a GIF, JPEG, or PNG image file.
|
MIPMappedImage(java.awt.Image im)
Construct a MIPMappedImage from an Image object.
|
Modifier and Type | Method and Description |
---|---|
float |
getAverageComponent(int component)
Get the average value for a particular component, over the entire image.
|
void |
getColor(RGBColor theColor,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Get the color at a particular location.
|
float |
getComponent(int component,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Get the value of a single component at a particular location in the image.
|
int |
getComponentCount()
Get the number of components in the image.
|
void |
getGradient(Vec2 grad,
int component,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Get the gradient of a single component at a particular location in the image.
|
int |
getHeight()
Get the height of the image.
|
java.awt.Image |
getPreview()
Get a scaled down copy of the image, to use for previews.
|
int |
getWidth()
Get the width of the image.
|
void |
writeToStream(java.io.DataOutputStream out)
Serialize an image to an output stream.
|
public MIPMappedImage(java.awt.Image im) throws java.lang.InterruptedException
java.lang.InterruptedException
public MIPMappedImage(java.io.File file) throws java.lang.InterruptedException
java.lang.InterruptedException
public MIPMappedImage(java.io.DataInputStream in) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
public MIPMappedImage(java.io.DataInputStream in, short version) throws java.io.IOException, java.io.InvalidObjectException
java.io.IOException
java.io.InvalidObjectException
public int getHeight()
public int getComponentCount()
getComponentCount
in class ImageMap
public float getComponent(int component, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
getComponent
in class ImageMap
public float getAverageComponent(int component)
getAverageComponent
in class ImageMap
public void getColor(RGBColor theColor, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
public void getGradient(Vec2 grad, int component, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
getGradient
in class ImageMap
public java.awt.Image getPreview()
getPreview
in class ImageMap
public void writeToStream(java.io.DataOutputStream out) throws java.io.IOException
writeToStream
in class ImageMap
java.io.IOException