Crossfire JXClient, Trunk
Public Member Functions | Private Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.faces.RawScale8d Class Reference
Collaboration diagram for com.realtime.crossfire.jxclient.faces.RawScale8d:
Collaboration graph

Public Member Functions

int[] getScaledData ()
 
 RawScale8d (final int @NotNull[] imageData, final int dataWidth, final int dataHeight)
 

Private Member Functions

int getSourcePixel (final int x, final int y)
 
void process (final int x, final int y)
 
void setDestPixel (final int x, final int y, final int p)
 

Private Attributes

final int[] dstImage
 
final int height
 
final Map< Integer, Integer > pixels = new HashMap<>()
 
final int[] srcImage
 
final int width
 

Detailed Description

Scales down a raw image to an eighth in both dimensions.

Author
Andreas Kirschbaum

Definition at line 34 of file RawScale8d.java.

Constructor & Destructor Documentation

◆ RawScale8d()

com.realtime.crossfire.jxclient.faces.RawScale8d.RawScale8d ( final int @NotNull[]  imageData,
final int  dataWidth,
final int  dataHeight 
)

Creates a new instance.

Parameters
imageDatathe source image data to process
dataWidththe width of the source image
dataHeightthe height of the source image

Definition at line 68 of file RawScale8d.java.

References com.realtime.crossfire.jxclient.faces.RawScale8d.dstImage, com.realtime.crossfire.jxclient.faces.RawScale8d.height, com.realtime.crossfire.jxclient.faces.RawScale8d.srcImage, and com.realtime.crossfire.jxclient.faces.RawScale8d.width.

Member Function Documentation

◆ getScaledData()

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.

Returns
an array of pixels 64 times smaller than the input array containing the scaled down image

Definition at line 132 of file RawScale8d.java.

References com.realtime.crossfire.jxclient.faces.RawScale8d.dstImage, com.realtime.crossfire.jxclient.faces.RawScale8d.height, com.realtime.crossfire.jxclient.faces.RawScale8d.process(), and com.realtime.crossfire.jxclient.faces.RawScale8d.width.

Referenced by com.realtime.crossfire.jxclient.faces.ImageScale8d.getScaledImage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSourcePixel()

int com.realtime.crossfire.jxclient.faces.RawScale8d.getSourcePixel ( final int  x,
final int  y 
)
private

Gets a pixel from the source image.

Parameters
xthe x location of the pixel to retrieve
ythe y location of the pixel to retrieve
Returns
the pixel value at the specified location

Definition at line 92 of file RawScale8d.java.

References com.realtime.crossfire.jxclient.faces.RawScale8d.srcImage, and com.realtime.crossfire.jxclient.faces.RawScale8d.width.

Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.process().

Here is the caller graph for this function:

◆ process()

void com.realtime.crossfire.jxclient.faces.RawScale8d.process ( final int  x,
final int  y 
)
private

Processes a specific destination pixel.

Parameters
xthe x location in the source image of the pixel to process
ythe y location in the source image of the pixel to process

Definition at line 101 of file RawScale8d.java.

References com.realtime.crossfire.jxclient.faces.RawScale8d.getSourcePixel(), com.realtime.crossfire.jxclient.faces.RawScale8d.pixels, and com.realtime.crossfire.jxclient.faces.RawScale8d.setDestPixel().

Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.getScaledData().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setDestPixel()

void com.realtime.crossfire.jxclient.faces.RawScale8d.setDestPixel ( final int  x,
final int  y,
final int  p 
)
private

Sets a pixel in the destination image data.

Parameters
xthe x location of the pixel to set
ythe y location of the pixel to set
pthe value of the pixel to set

Definition at line 82 of file RawScale8d.java.

References com.realtime.crossfire.jxclient.faces.RawScale8d.dstImage, and com.realtime.crossfire.jxclient.faces.RawScale8d.width.

Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.process().

Here is the caller graph for this function:

Member Data Documentation

◆ dstImage

final int [] com.realtime.crossfire.jxclient.faces.RawScale8d.dstImage
private

◆ height

final int com.realtime.crossfire.jxclient.faces.RawScale8d.height
private

◆ pixels

final Map<Integer, Integer> com.realtime.crossfire.jxclient.faces.RawScale8d.pixels = new HashMap<>()
private

Maps pixel value to number of pixels.

Definition at line 60 of file RawScale8d.java.

Referenced by com.realtime.crossfire.jxclient.faces.RawScale8d.process().

◆ srcImage

final int [] com.realtime.crossfire.jxclient.faces.RawScale8d.srcImage
private

◆ width

final int com.realtime.crossfire.jxclient.faces.RawScale8d.width
private

The documentation for this class was generated from the following file: