public class Java2DFrameConverter extends FrameConverter<BufferedImage>
Frame
and BufferedImage
.
Since BufferedImage
does not support NIO buffers, we cannot share
allocated memory with Frame
.Modifier and Type | Field and Description |
---|---|
protected BufferedImage |
bufferedImage |
static byte[] |
gamma22 |
static byte[] |
gamma22inv |
frame
Constructor and Description |
---|
Java2DFrameConverter() |
Modifier and Type | Method and Description |
---|---|
static void |
applyGamma(Buffer buffer,
int depth,
int stride,
double gamma) |
static void |
applyGamma(Frame frame,
double gamma) |
static BufferedImage |
cloneBufferedImage(BufferedImage source) |
Frame |
convert(BufferedImage img) |
BufferedImage |
convert(Frame frame) |
static void |
copy(BufferedImage image,
Frame frame) |
static void |
copy(BufferedImage image,
Frame frame,
double gamma) |
static void |
copy(BufferedImage image,
Frame frame,
double gamma,
boolean flipChannels,
Rectangle roi) |
static void |
copy(Frame frame,
BufferedImage bufferedImage) |
static void |
copy(Frame frame,
BufferedImage bufferedImage,
double gamma) |
static void |
copy(Frame frame,
BufferedImage bufferedImage,
double gamma,
boolean flipChannels,
Rectangle roi) |
static int |
decodeGamma22(int value) |
static int |
encodeGamma22(int value) |
static void |
flipCopyWithGamma(ByteBuffer srcBuf,
int srcBufferIndex,
int srcStep,
ByteBuffer dstBuf,
int dstBufferIndex,
int dstStep,
boolean signed,
double gamma,
boolean flip,
int channels) |
static void |
flipCopyWithGamma(DoubleBuffer srcBuf,
int srcBufferIndex,
int srcStep,
DoubleBuffer dstBuf,
int dstBufferIndex,
int dstStep,
double gamma,
boolean flip,
int channels) |
static void |
flipCopyWithGamma(FloatBuffer srcBuf,
int srcBufferIndex,
int srcStep,
FloatBuffer dstBuf,
int dstBufferIndex,
int dstStep,
double gamma,
boolean flip,
int channels) |
static void |
flipCopyWithGamma(IntBuffer srcBuf,
int srcBufferIndex,
int srcStep,
IntBuffer dstBuf,
int dstBufferIndex,
int dstStep,
double gamma,
boolean flip,
int channels) |
static void |
flipCopyWithGamma(ShortBuffer srcBuf,
int srcBufferIndex,
int srcStep,
ShortBuffer dstBuf,
int dstBufferIndex,
int dstStep,
boolean signed,
double gamma,
boolean flip,
int channels) |
BufferedImage |
getBufferedImage(Frame frame) |
BufferedImage |
getBufferedImage(Frame frame,
double gamma) |
BufferedImage |
getBufferedImage(Frame frame,
double gamma,
boolean flipChannels,
ColorSpace cs) |
static int |
getBufferedImageType(Frame frame) |
Frame |
getFrame(BufferedImage image)
Returns a Frame based on a BufferedImage.
|
Frame |
getFrame(BufferedImage image,
double gamma)
Returns a Frame based on a BufferedImage, and given gamma.
|
Frame |
getFrame(BufferedImage image,
double gamma,
boolean flipChannels)
Returns a Frame based on a BufferedImage, given gamma, and inverted channels flag.
|
close
public static final byte[] gamma22
public static final byte[] gamma22inv
protected BufferedImage bufferedImage
public Frame convert(BufferedImage img)
convert
in class FrameConverter<BufferedImage>
public BufferedImage convert(Frame frame)
convert
in class FrameConverter<BufferedImage>
public static BufferedImage cloneBufferedImage(BufferedImage source)
source
- public static int decodeGamma22(int value)
public static int encodeGamma22(int value)
public static void flipCopyWithGamma(ByteBuffer srcBuf, int srcBufferIndex, int srcStep, ByteBuffer dstBuf, int dstBufferIndex, int dstStep, boolean signed, double gamma, boolean flip, int channels)
public static void flipCopyWithGamma(ShortBuffer srcBuf, int srcBufferIndex, int srcStep, ShortBuffer dstBuf, int dstBufferIndex, int dstStep, boolean signed, double gamma, boolean flip, int channels)
public static void flipCopyWithGamma(IntBuffer srcBuf, int srcBufferIndex, int srcStep, IntBuffer dstBuf, int dstBufferIndex, int dstStep, double gamma, boolean flip, int channels)
public static void flipCopyWithGamma(FloatBuffer srcBuf, int srcBufferIndex, int srcStep, FloatBuffer dstBuf, int dstBufferIndex, int dstStep, double gamma, boolean flip, int channels)
public static void flipCopyWithGamma(DoubleBuffer srcBuf, int srcBufferIndex, int srcStep, DoubleBuffer dstBuf, int dstBufferIndex, int dstStep, double gamma, boolean flip, int channels)
public static void applyGamma(Frame frame, double gamma)
public static void applyGamma(Buffer buffer, int depth, int stride, double gamma)
public static void copy(Frame frame, BufferedImage bufferedImage)
public static void copy(Frame frame, BufferedImage bufferedImage, double gamma)
public static void copy(Frame frame, BufferedImage bufferedImage, double gamma, boolean flipChannels, Rectangle roi)
public static void copy(BufferedImage image, Frame frame)
public static void copy(BufferedImage image, Frame frame, double gamma)
public static void copy(BufferedImage image, Frame frame, double gamma, boolean flipChannels, Rectangle roi)
public static int getBufferedImageType(Frame frame)
public BufferedImage getBufferedImage(Frame frame)
public BufferedImage getBufferedImage(Frame frame, double gamma)
public BufferedImage getBufferedImage(Frame frame, double gamma, boolean flipChannels, ColorSpace cs)
public Frame getFrame(BufferedImage image)
public Frame getFrame(BufferedImage image, double gamma)
public Frame getFrame(BufferedImage image, double gamma, boolean flipChannels)
Copyright © 2023. All rights reserved.