Hello all,
I'm using JavaCV library and as OpenCV assumes BGR layout for the pixels,
creating this format in ImageType allows an easier integration with the
BufferedImage generated by PDFRenderer.renderImage and
JavaCV's Java2DFrameUtils.toMat, which handles the conversion to the class
used by that library.
The other formats available in ImageType require further conversion of the
pixel layout as the pixels in RGB/ARGB are represented in integers instead
of 3 bytes, which is harder/cumbersome to convert ignoring the alpha and
obtaining the desired output.
The change required in ImageType is the inclusion of this enum
/** Blue, Green, Red*/
> BGR
> {
> @Override
> int toBufferedImageType()
> {
> return BufferedImage.TYPE_3BYTE_BGR;
> }
> },
>
How should I proceed so this change goes through the development process?