mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 22:00:25 +08:00
2674c6b5e0
Fix GDAL image decoding color problems identified by issue #10089, by: (#10093) * Fix GDAL image decoding color problems identified by issue #10089, by: Fixing CV_8UC1 symbol, which should be CV_8UC3 for RGB GDAL color table images. Fixing image.ptr<VecX>(row,col)[] to be (*image.ptr<VecX>(row,col))[] to correctly access VecX array elements, as ptr<VecX>() returns a pointer to the VecX, not the first element of VecX. This fixes the color problem with color table gif images, and avoids out-of-bounds memory access. Respecting the color identification of raster bands provided by the GDAL image driver, and produce BGR or BGRA images. Note that color bands of images using the HSL, CMY, CMYK, or YCbCr color space are ignored, rather than converting them to BGR. * When reading image files using the GDAL decoder, exit with an error if a color band is encountered that isn't used (eg. from CMYK or YCbCbr), rather than silently ignoring the band's data. |
||
---|---|---|
.. | ||
include/opencv2 | ||
misc/java/test | ||
perf | ||
src | ||
test | ||
CMakeLists.txt |