 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.faces;
25 import org.jetbrains.annotations.NotNull;
60 public RawScale2x(
final int @NotNull [] imageData,
final int dataWidth,
final int dataHeight) {
65 dstImage =
new int[imageData.length*4];
75 private static boolean different(
final int a,
final int b) {
97 final int xx = Math.min(
width-1, Math.max(0, x));
98 final int yy = Math.min(
height-1, Math.max(0, y));
108 private void process(
final int x,
final int y) {
147 for (
int x = 0; x <
width; x++) {
148 for (
int y = 0; y <
height; y++) {
final int[] dstImage
The destination image data.
final int width
The width of the source image.
A simple implementation of the Scale2x algorithm for scaling raw image data.
static boolean different(final int a, final int b)
Checks if two pixels are different.
void setDestPixel(final int x, final int y, final int p)
Sets a pixel in the destination image data.
int getSourcePixel(final int x, final int y)
Gets a pixel from the source image.
final int[] srcImage
The source image data.
RawScale2x(final int @NotNull[] imageData, final int dataWidth, final int dataHeight)
Creates a new scaler based on some raw data.
int[] getScaledData()
Gets the scale image data.
final int height
The height of the source image.
void process(final int x, final int y)
Processes a specific pixel.