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
Fields inherited from class org.bytedeco.copiedstuff.FrameConverter
frame
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
applyGamma
(Buffer buffer, int depth, int stride, double gamma) static void
applyGamma
(Frame frame, double gamma) static BufferedImage
cloneBufferedImage
(BufferedImage bufferedImage) convert
(BufferedImage img) 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 srcStep, ByteBuffer dstBuf, int dstStep, boolean signed, double gamma, boolean flip, int channels) static void
flipCopyWithGamma
(DoubleBuffer srcBuf, int srcStep, DoubleBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) static void
flipCopyWithGamma
(FloatBuffer srcBuf, int srcStep, FloatBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) static void
flipCopyWithGamma
(IntBuffer srcBuf, int srcStep, IntBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels) static void
flipCopyWithGamma
(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 int
getBufferedImageType
(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:
convert
in classFrameConverter<BufferedImage>
-
convert
- Specified by:
convert
in 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.
-