Package org.bytedeco.copiedstuff
Class Java2DFrameConverter
java.lang.Object
org.bytedeco.copiedstuff.FrameConverter<BufferedImage>
org.bytedeco.copiedstuff.Java2DFrameConverter
A utility class to copy data between
Frame and BufferedImage.
Since BufferedImage does not support NIO buffers, we cannot share
allocated memory with Frame.-
Field Summary
FieldsFields inherited from class org.bytedeco.copiedstuff.FrameConverter
frame -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidapplyGamma(Buffer buffer, int depth, int stride, double gamma) static voidapplyGamma(Frame frame, double gamma) static BufferedImagecloneBufferedImage(BufferedImage bufferedImage) convert(BufferedImage img) static voidcopy(BufferedImage image, Frame frame) static voidcopy(BufferedImage image, Frame frame, double gamma) static voidcopy(BufferedImage image, Frame frame, double gamma, boolean flipChannels, Rectangle roi) static voidcopy(Frame frame, BufferedImage bufferedImage) static voidcopy(Frame frame, BufferedImage bufferedImage, double gamma) static voidcopy(Frame frame, BufferedImage bufferedImage, double gamma, boolean flipChannels, Rectangle roi) static intdecodeGamma22(int value) static intencodeGamma22(int value) static voidflipCopyWithGamma(ByteBuffer srcBuf, int srcStep, ByteBuffer dstBuf, int dstStep, boolean signed, double gamma, boolean flip, int channels) static voidflipCopyWithGamma(DoubleBuffer srcBuf, int srcStep, DoubleBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) static voidflipCopyWithGamma(FloatBuffer srcBuf, int srcStep, FloatBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) static voidflipCopyWithGamma(IntBuffer srcBuf, int srcStep, IntBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) static voidflipCopyWithGamma(ShortBuffer srcBuf, int srcStep, ShortBuffer dstBuf, int dstStep, boolean signed, double gamma, boolean flip, int channels) getBufferedImage(Frame frame) getBufferedImage(Frame frame, double gamma) getBufferedImage(Frame frame, double gamma, boolean flipChannels, ColorSpace cs) static intgetBufferedImageType(Frame frame) getFrame(BufferedImage image) Returns a Frame based on a BufferedImage.getFrame(BufferedImage image, double gamma) Returns a Frame based on a BufferedImage, and given gamma.getFrame(BufferedImage image, double gamma, boolean flipChannels) Returns a Frame based on a BufferedImage, given gamma, and inverted channels flag.
-
Field Details
-
gamma22
public static final byte[] gamma22 -
gamma22inv
public static final byte[] gamma22inv -
bufferedImage
-
-
Constructor Details
-
Java2DFrameConverter
public Java2DFrameConverter()
-
-
Method Details
-
convert
- Specified by:
convertin classFrameConverter<BufferedImage>
-
convert
- Specified by:
convertin classFrameConverter<BufferedImage>
-
cloneBufferedImage
-
decodeGamma22
public static int decodeGamma22(int value) -
encodeGamma22
public static int encodeGamma22(int value) -
flipCopyWithGamma
public static void flipCopyWithGamma(ByteBuffer srcBuf, int srcStep, ByteBuffer dstBuf, int dstStep, boolean signed, double gamma, boolean flip, int channels) -
flipCopyWithGamma
public static void flipCopyWithGamma(ShortBuffer srcBuf, int srcStep, ShortBuffer dstBuf, int dstStep, boolean signed, double gamma, boolean flip, int channels) -
flipCopyWithGamma
-
flipCopyWithGamma
public static void flipCopyWithGamma(FloatBuffer srcBuf, int srcStep, FloatBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) -
flipCopyWithGamma
public static void flipCopyWithGamma(DoubleBuffer srcBuf, int srcStep, DoubleBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) -
applyGamma
-
applyGamma
-
copy
-
copy
-
copy
public static void copy(Frame frame, BufferedImage bufferedImage, double gamma, boolean flipChannels, Rectangle roi) -
copy
-
copy
-
copy
public static void copy(BufferedImage image, Frame frame, double gamma, boolean flipChannels, Rectangle roi) -
getBufferedImageType
-
getBufferedImage
-
getBufferedImage
-
getBufferedImage
public BufferedImage getBufferedImage(Frame frame, double gamma, boolean flipChannels, ColorSpace cs) -
getFrame
Returns a Frame based on a BufferedImage. -
getFrame
Returns a Frame based on a BufferedImage, and given gamma. -
getFrame
Returns a Frame based on a BufferedImage, given gamma, and inverted channels flag.
-