opencv/modules/imgcodecs
gdkessler 2674c6b5e0 Merge pull request #10093 from gdkessler/gdal_image_read_fix_10089
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.
2017-11-20 15:07:24 +03:00
..
include/opencv2 python: imreadmulti - add CV_OUT so it is correctly wrapped 2017-09-08 15:09:25 +02:00
misc/java/test Modified java wrapping mechanism 2015-03-02 18:12:30 +03:00
perf Split highgui module to videoio and highgui 2014-07-14 23:16:47 +04:00
src Merge pull request #10093 from gdkessler/gdal_image_read_fix_10089 2017-11-20 15:07:24 +03:00
test imgcodecs: fix regression 9376 2017-08-29 13:31:26 +03:00
CMakeLists.txt cmake: CMP0022 NEW 2017-08-19 15:15:05 +00:00