Class Java2DFrameConverter

java.lang.Object
org.bytedeco.copiedstuff.FrameConverter<BufferedImage>
org.bytedeco.copiedstuff.Java2DFrameConverter

public class Java2DFrameConverter extends FrameConverter<BufferedImage>
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 Details

    • gamma22

      public static final byte[] gamma22
    • gamma22inv

      public static final byte[] gamma22inv
    • bufferedImage

      protected BufferedImage bufferedImage
  • Constructor Details

    • Java2DFrameConverter

      public Java2DFrameConverter()
  • Method Details

    • convert

      public Frame convert(BufferedImage img)
      Specified by:
      convert in class FrameConverter<BufferedImage>
    • convert

      public BufferedImage convert(Frame frame)
      Specified by:
      convert in class FrameConverter<BufferedImage>
    • cloneBufferedImage

      public static BufferedImage cloneBufferedImage(BufferedImage bufferedImage)
    • 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

      public static void flipCopyWithGamma(IntBuffer srcBuf, int srcStep, IntBuffer dstBuf, int dstStep, double gamma, boolean flip, int channels)
    • 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

      public static void applyGamma(Frame frame, double gamma)
    • applyGamma

      public static void applyGamma(Buffer buffer, int depth, int stride, double gamma)
    • copy

      public static void copy(Frame frame, BufferedImage bufferedImage)
    • copy

      public static void copy(Frame frame, BufferedImage bufferedImage, double gamma)
    • copy

      public static void copy(Frame frame, BufferedImage bufferedImage, double gamma, boolean flipChannels, Rectangle roi)
    • copy

      public static void copy(BufferedImage image, Frame frame)
    • copy

      public static void copy(BufferedImage image, Frame frame, double gamma)
    • copy

      public static void copy(BufferedImage image, Frame frame, double gamma, boolean flipChannels, Rectangle roi)
    • getBufferedImageType

      public static int getBufferedImageType(Frame frame)
    • getBufferedImage

      public BufferedImage getBufferedImage(Frame frame)
    • getBufferedImage

      public BufferedImage getBufferedImage(Frame frame, double gamma)
    • getBufferedImage

      public BufferedImage getBufferedImage(Frame frame, double gamma, boolean flipChannels, ColorSpace cs)
    • getFrame

      public Frame getFrame(BufferedImage image)
      Returns a Frame based on a BufferedImage.
    • getFrame

      public Frame getFrame(BufferedImage image, double gamma)
      Returns a Frame based on a BufferedImage, and given gamma.
    • getFrame

      public Frame getFrame(BufferedImage image, double gamma, boolean flipChannels)
      Returns a Frame based on a BufferedImage, given gamma, and inverted channels flag.