Crossfire JXClient, Trunk
R20561
|
Scales down a raw image to an eighth in both dimensions. More...
Public Member Functions | |
int [] | getScaledData () |
Returns the scale image data. More... | |
RawScale8d (@NotNull final int[] imageData, final int dataWidth, final int dataHeight) | |
Creates a new instance. More... | |
Private Member Functions | |
int | getSourcePixel (final int x, final int y) |
Gets a pixel from the source image. More... | |
void | process (final int x, final int y) |
Processes a specific destination pixel. More... | |
void | setDestPixel (final int x, final int y, final int p) |
Sets a pixel in the destination image data. More... | |
Private Attributes | |
final int [] | dstImage |
The destination image data. More... | |
final int | height |
The height of the source image. More... | |
final Map< Integer, Integer > | pixels = new HashMap<>() |
Maps pixel value to number of pixels. More... | |
final int [] | srcImage |
The source image data. More... | |
final int | width |
The width of the source image. More... | |
Scales down a raw image to an eighth in both dimensions.
Definition at line 33 of file RawScale8d.java.
com.realtime.crossfire.jxclient.faces.RawScale8d.RawScale8d | ( | @NotNull final int [] | imageData, |
final int | dataWidth, | ||
final int | dataHeight | ||
) |
Creates a new instance.
imageData | the source image data to process |
dataWidth | the width of the source image |
dataHeight | the height of the source image |
Definition at line 69 of file RawScale8d.java.
int [] com.realtime.crossfire.jxclient.faces.RawScale8d.getScaledData | ( | ) |
Returns the scale image data.
Note this is the method that does the work so it might take some time to process.
Definition at line 134 of file RawScale8d.java.
References com.realtime.crossfire.jxclient.faces.RawScale8d.dstImage, and com.realtime.crossfire.jxclient.faces.RawScale8d.process().
Referenced by com.realtime.crossfire.jxclient.faces.ImageScale8d.getScaledImage().
|
private |
Gets a pixel from the source image.
x | the x location of the pixel to retrieve |
y | the y location of the pixel to retrieve |
Definition at line 93 of file RawScale8d.java.
References com.realtime.crossfire.jxclient.faces.RawScale8d.width.
Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.process().
|
private |
Processes a specific destination pixel.
x | the x location in the source image of the pixel to process |
y | the y location in the source image of the pixel to process |
Definition at line 102 of file RawScale8d.java.
References com.realtime.crossfire.jxclient.faces.RawScale8d.getSourcePixel(), and com.realtime.crossfire.jxclient.faces.RawScale8d.setDestPixel().
Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.getScaledData().
|
private |
Sets a pixel in the destination image data.
x | the x location of the pixel to set |
y | the y location of the pixel to set |
p | the value of the pixel to set |
Definition at line 83 of file RawScale8d.java.
Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.process().
|
private |
The destination image data.
Definition at line 45 of file RawScale8d.java.
Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.getScaledData().
|
private |
The height of the source image.
Definition at line 55 of file RawScale8d.java.
|
private |
Maps pixel value to number of pixels.
Definition at line 61 of file RawScale8d.java.
|
private |
The source image data.
Definition at line 39 of file RawScale8d.java.
|
private |
The width of the source image.
Definition at line 50 of file RawScale8d.java.
Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.getSourcePixel().