Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.faces.RawScale8d Class Reference

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

+ Collaboration diagram for com.realtime.crossfire.jxclient.faces.RawScale8d:

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...
 

Detailed Description

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

Author
Andreas Kirschbaum

Definition at line 33 of file RawScale8d.java.

Constructor & Destructor Documentation

◆ RawScale8d()

com.realtime.crossfire.jxclient.faces.RawScale8d.RawScale8d ( @NotNull final int []  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 69 of file RawScale8d.java.

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 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().

+ 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 93 of file RawScale8d.java.

References 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 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().

+ 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 83 of file RawScale8d.java.

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

The destination image data.

Definition at line 45 of file RawScale8d.java.

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

◆ height

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

The height of the source image.

Definition at line 55 of file RawScale8d.java.

◆ 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 61 of file RawScale8d.java.

◆ srcImage

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

The source image data.

Definition at line 39 of file RawScale8d.java.

◆ width

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

The width of the source image.

Definition at line 50 of file RawScale8d.java.

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


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