org.opencv.imgcodecs

## Class Imgcodecs

- java.lang.Object
- - org.opencv.imgcodecs.Imgcodecs

-     public class Imgcodecs
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CV_CVTIMG_FLIP`
    `static int` | `CV_CVTIMG_SWAP_RB`
    `static int` | `CV_IMWRITE_JPEG_CHROMA_QUALITY`
    `static int` | `CV_IMWRITE_JPEG_LUMA_QUALITY`
    `static int` | `CV_IMWRITE_JPEG_OPTIMIZE`
    `static int` | `CV_IMWRITE_JPEG_PROGRESSIVE`
    `static int` | `CV_IMWRITE_JPEG_QUALITY`
    `static int` | `CV_IMWRITE_JPEG_RST_INTERVAL`
    `static int` | `CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE`
    `static int` | `CV_IMWRITE_PAM_FORMAT_GRAYSCALE`
    `static int` | `CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA`
    `static int` | `CV_IMWRITE_PAM_FORMAT_NULL`
    `static int` | `CV_IMWRITE_PAM_FORMAT_RGB`
    `static int` | `CV_IMWRITE_PAM_FORMAT_RGB_ALPHA`
    `static int` | `CV_IMWRITE_PAM_TUPLETYPE`
    `static int` | `CV_IMWRITE_PNG_BILEVEL`
    `static int` | `CV_IMWRITE_PNG_COMPRESSION`
    `static int` | `CV_IMWRITE_PNG_STRATEGY`
    `static int` | `CV_IMWRITE_PNG_STRATEGY_DEFAULT`
    `static int` | `CV_IMWRITE_PNG_STRATEGY_FILTERED`
    `static int` | `CV_IMWRITE_PNG_STRATEGY_FIXED`
    `static int` | `CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY`
    `static int` | `CV_IMWRITE_PNG_STRATEGY_RLE`
    `static int` | `CV_IMWRITE_PXM_BINARY`
    `static int` | `CV_IMWRITE_WEBP_QUALITY`
    `static int` | `CV_LOAD_IMAGE_ANYCOLOR`
    `static int` | `CV_LOAD_IMAGE_ANYDEPTH`
    `static int` | `CV_LOAD_IMAGE_COLOR`
    `static int` | `CV_LOAD_IMAGE_GRAYSCALE`
    `static int` | `CV_LOAD_IMAGE_IGNORE_ORIENTATION`
    `static int` | `CV_LOAD_IMAGE_UNCHANGED`
    `static int` | `IMREAD_ANYCOLOR`
    `static int` | `IMREAD_ANYDEPTH`
    `static int` | `IMREAD_COLOR`
    `static int` | `IMREAD_GRAYSCALE`
    `static int` | `IMREAD_IGNORE_ORIENTATION`
    `static int` | `IMREAD_LOAD_GDAL`
    `static int` | `IMREAD_REDUCED_COLOR_2`
    `static int` | `IMREAD_REDUCED_COLOR_4`
    `static int` | `IMREAD_REDUCED_COLOR_8`
    `static int` | `IMREAD_REDUCED_GRAYSCALE_2`
    `static int` | `IMREAD_REDUCED_GRAYSCALE_4`
    `static int` | `IMREAD_REDUCED_GRAYSCALE_8`
    `static int` | `IMREAD_UNCHANGED`
    `static int` | `IMWRITE_JPEG_CHROMA_QUALITY`
    `static int` | `IMWRITE_JPEG_LUMA_QUALITY`
    `static int` | `IMWRITE_JPEG_OPTIMIZE`
    `static int` | `IMWRITE_JPEG_PROGRESSIVE`
    `static int` | `IMWRITE_JPEG_QUALITY`
    `static int` | `IMWRITE_JPEG_RST_INTERVAL`
    `static int` | `IMWRITE_PAM_FORMAT_BLACKANDWHITE`
    `static int` | `IMWRITE_PAM_FORMAT_GRAYSCALE`
    `static int` | `IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA`
    `static int` | `IMWRITE_PAM_FORMAT_NULL`
    `static int` | `IMWRITE_PAM_FORMAT_RGB`
    `static int` | `IMWRITE_PAM_FORMAT_RGB_ALPHA`
    `static int` | `IMWRITE_PAM_TUPLETYPE`
    `static int` | `IMWRITE_PNG_BILEVEL`
    `static int` | `IMWRITE_PNG_COMPRESSION`
    `static int` | `IMWRITE_PNG_STRATEGY`
    `static int` | `IMWRITE_PNG_STRATEGY_DEFAULT`
    `static int` | `IMWRITE_PNG_STRATEGY_FILTERED`
    `static int` | `IMWRITE_PNG_STRATEGY_FIXED`
    `static int` | `IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY`
    `static int` | `IMWRITE_PNG_STRATEGY_RLE`
    `static int` | `IMWRITE_PXM_BINARY`
    `static int` | `IMWRITE_WEBP_QUALITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Imgcodecs()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static Mat` | `imdecode(Mat buf, int flags)`
    `static boolean` | `imencode(java.lang.String ext, Mat img, MatOfByte buf)`
    `static boolean` | `imencode(java.lang.String ext, Mat img, MatOfByte buf, MatOfInt params)`
    `static Mat` | `imread(java.lang.String filename)`
    `static Mat` | `imread(java.lang.String filename, int flags)`
    `static boolean` | `imreadmulti(java.lang.String filename, java.util.List<Mat> mats)`
    `static boolean` | `imreadmulti(java.lang.String filename, java.util.List<Mat> mats, int flags)`
    `static boolean` | `imwrite(java.lang.String filename, Mat img)`
    `static boolean` | `imwrite(java.lang.String filename, Mat img, MatOfInt params)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CV_LOAD_IMAGE_UNCHANGED

          public static final int CV_LOAD_IMAGE_UNCHANGED

      See Also:
        Constant Field Values

    - #### CV_LOAD_IMAGE_GRAYSCALE

          public static final int CV_LOAD_IMAGE_GRAYSCALE

      See Also:
        Constant Field Values

    - #### CV_LOAD_IMAGE_COLOR

          public static final int CV_LOAD_IMAGE_COLOR

      See Also:
        Constant Field Values

    - #### CV_LOAD_IMAGE_ANYDEPTH

          public static final int CV_LOAD_IMAGE_ANYDEPTH

      See Also:
        Constant Field Values

    - #### CV_LOAD_IMAGE_ANYCOLOR

          public static final int CV_LOAD_IMAGE_ANYCOLOR

      See Also:
        Constant Field Values

    - #### CV_LOAD_IMAGE_IGNORE_ORIENTATION

          public static final int CV_LOAD_IMAGE_IGNORE_ORIENTATION

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_JPEG_QUALITY

          public static final int CV_IMWRITE_JPEG_QUALITY

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_JPEG_PROGRESSIVE

          public static final int CV_IMWRITE_JPEG_PROGRESSIVE

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_JPEG_OPTIMIZE

          public static final int CV_IMWRITE_JPEG_OPTIMIZE

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_JPEG_RST_INTERVAL

          public static final int CV_IMWRITE_JPEG_RST_INTERVAL

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_JPEG_LUMA_QUALITY

          public static final int CV_IMWRITE_JPEG_LUMA_QUALITY

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_JPEG_CHROMA_QUALITY

          public static final int CV_IMWRITE_JPEG_CHROMA_QUALITY

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_COMPRESSION

          public static final int CV_IMWRITE_PNG_COMPRESSION

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_STRATEGY

          public static final int CV_IMWRITE_PNG_STRATEGY

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_BILEVEL

          public static final int CV_IMWRITE_PNG_BILEVEL

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_STRATEGY_DEFAULT

          public static final int CV_IMWRITE_PNG_STRATEGY_DEFAULT

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_STRATEGY_FILTERED

          public static final int CV_IMWRITE_PNG_STRATEGY_FILTERED

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY

          public static final int CV_IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_STRATEGY_RLE

          public static final int CV_IMWRITE_PNG_STRATEGY_RLE

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PNG_STRATEGY_FIXED

          public static final int CV_IMWRITE_PNG_STRATEGY_FIXED

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PXM_BINARY

          public static final int CV_IMWRITE_PXM_BINARY

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_WEBP_QUALITY

          public static final int CV_IMWRITE_WEBP_QUALITY

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PAM_TUPLETYPE

          public static final int CV_IMWRITE_PAM_TUPLETYPE

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PAM_FORMAT_NULL

          public static final int CV_IMWRITE_PAM_FORMAT_NULL

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE

          public static final int CV_IMWRITE_PAM_FORMAT_BLACKANDWHITE

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PAM_FORMAT_GRAYSCALE

          public static final int CV_IMWRITE_PAM_FORMAT_GRAYSCALE

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA

          public static final int CV_IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PAM_FORMAT_RGB

          public static final int CV_IMWRITE_PAM_FORMAT_RGB

      See Also:
        Constant Field Values

    - #### CV_IMWRITE_PAM_FORMAT_RGB_ALPHA

          public static final int CV_IMWRITE_PAM_FORMAT_RGB_ALPHA

      See Also:
        Constant Field Values

    - #### CV_CVTIMG_FLIP

          public static final int CV_CVTIMG_FLIP

      See Also:
        Constant Field Values

    - #### CV_CVTIMG_SWAP_RB

          public static final int CV_CVTIMG_SWAP_RB

      See Also:
        Constant Field Values

    - #### IMREAD_UNCHANGED

          public static final int IMREAD_UNCHANGED

      See Also:
        Constant Field Values

    - #### IMREAD_GRAYSCALE

          public static final int IMREAD_GRAYSCALE

      See Also:
        Constant Field Values

    - #### IMREAD_COLOR

          public static final int IMREAD_COLOR

      See Also:
        Constant Field Values

    - #### IMREAD_ANYDEPTH

          public static final int IMREAD_ANYDEPTH

      See Also:
        Constant Field Values

    - #### IMREAD_ANYCOLOR

          public static final int IMREAD_ANYCOLOR

      See Also:
        Constant Field Values

    - #### IMREAD_LOAD_GDAL

          public static final int IMREAD_LOAD_GDAL

      See Also:
        Constant Field Values

    - #### IMREAD_REDUCED_GRAYSCALE_2

          public static final int IMREAD_REDUCED_GRAYSCALE_2

      See Also:
        Constant Field Values

    - #### IMREAD_REDUCED_COLOR_2

          public static final int IMREAD_REDUCED_COLOR_2

      See Also:
        Constant Field Values

    - #### IMREAD_REDUCED_GRAYSCALE_4

          public static final int IMREAD_REDUCED_GRAYSCALE_4

      See Also:
        Constant Field Values

    - #### IMREAD_REDUCED_COLOR_4

          public static final int IMREAD_REDUCED_COLOR_4

      See Also:
        Constant Field Values

    - #### IMREAD_REDUCED_GRAYSCALE_8

          public static final int IMREAD_REDUCED_GRAYSCALE_8

      See Also:
        Constant Field Values

    - #### IMREAD_REDUCED_COLOR_8

          public static final int IMREAD_REDUCED_COLOR_8

      See Also:
        Constant Field Values

    - #### IMREAD_IGNORE_ORIENTATION

          public static final int IMREAD_IGNORE_ORIENTATION

      See Also:
        Constant Field Values

    - #### IMWRITE_JPEG_QUALITY

          public static final int IMWRITE_JPEG_QUALITY

      See Also:
        Constant Field Values

    - #### IMWRITE_JPEG_PROGRESSIVE

          public static final int IMWRITE_JPEG_PROGRESSIVE

      See Also:
        Constant Field Values

    - #### IMWRITE_JPEG_OPTIMIZE

          public static final int IMWRITE_JPEG_OPTIMIZE

      See Also:
        Constant Field Values

    - #### IMWRITE_JPEG_RST_INTERVAL

          public static final int IMWRITE_JPEG_RST_INTERVAL

      See Also:
        Constant Field Values

    - #### IMWRITE_JPEG_LUMA_QUALITY

          public static final int IMWRITE_JPEG_LUMA_QUALITY

      See Also:
        Constant Field Values

    - #### IMWRITE_JPEG_CHROMA_QUALITY

          public static final int IMWRITE_JPEG_CHROMA_QUALITY

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_COMPRESSION

          public static final int IMWRITE_PNG_COMPRESSION

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_STRATEGY

          public static final int IMWRITE_PNG_STRATEGY

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_BILEVEL

          public static final int IMWRITE_PNG_BILEVEL

      See Also:
        Constant Field Values

    - #### IMWRITE_PXM_BINARY

          public static final int IMWRITE_PXM_BINARY

      See Also:
        Constant Field Values

    - #### IMWRITE_WEBP_QUALITY

          public static final int IMWRITE_WEBP_QUALITY

      See Also:
        Constant Field Values

    - #### IMWRITE_PAM_TUPLETYPE

          public static final int IMWRITE_PAM_TUPLETYPE

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_STRATEGY_DEFAULT

          public static final int IMWRITE_PNG_STRATEGY_DEFAULT

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_STRATEGY_FILTERED

          public static final int IMWRITE_PNG_STRATEGY_FILTERED

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY

          public static final int IMWRITE_PNG_STRATEGY_HUFFMAN_ONLY

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_STRATEGY_RLE

          public static final int IMWRITE_PNG_STRATEGY_RLE

      See Also:
        Constant Field Values

    - #### IMWRITE_PNG_STRATEGY_FIXED

          public static final int IMWRITE_PNG_STRATEGY_FIXED

      See Also:
        Constant Field Values

    - #### IMWRITE_PAM_FORMAT_NULL

          public static final int IMWRITE_PAM_FORMAT_NULL

      See Also:
        Constant Field Values

    - #### IMWRITE_PAM_FORMAT_BLACKANDWHITE

          public static final int IMWRITE_PAM_FORMAT_BLACKANDWHITE

      See Also:
        Constant Field Values

    - #### IMWRITE_PAM_FORMAT_GRAYSCALE

          public static final int IMWRITE_PAM_FORMAT_GRAYSCALE

      See Also:
        Constant Field Values

    - #### IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA

          public static final int IMWRITE_PAM_FORMAT_GRAYSCALE_ALPHA

      See Also:
        Constant Field Values

    - #### IMWRITE_PAM_FORMAT_RGB

          public static final int IMWRITE_PAM_FORMAT_RGB

      See Also:
        Constant Field Values

    - #### IMWRITE_PAM_FORMAT_RGB_ALPHA

          public static final int IMWRITE_PAM_FORMAT_RGB_ALPHA

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Imgcodecs

          public Imgcodecs()

  - ### Method Detail

    - #### imdecode

          public static Mat imdecode(Mat buf,
                                     int flags)

    - #### imread

          public static Mat imread(java.lang.String filename,
                                   int flags)

    - #### imread

          public static Mat imread(java.lang.String filename)

    - #### imencode

          public static boolean imencode(java.lang.String ext,
                                         Mat img,
                                         MatOfByte buf,
                                         MatOfInt params)

    - #### imencode

          public static boolean imencode(java.lang.String ext,
                                         Mat img,
                                         MatOfByte buf)

    - #### imreadmulti

          public static boolean imreadmulti(java.lang.String filename,
                                            java.util.List<Mat> mats,
                                            int flags)

    - #### imreadmulti

          public static boolean imreadmulti(java.lang.String filename,
                                            java.util.List<Mat> mats)

    - #### imwrite

          public static boolean imwrite(java.lang.String filename,
                                        Mat img,
                                        MatOfInt params)

    - #### imwrite

          public static boolean imwrite(java.lang.String filename,
                                        Mat img)