Open Source Computer Vision Library
Go to file
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
.github migration: github.com/opencv/opencv 2016-07-12 12:51:12 +03:00
3rdparty Fixed minor issues reported by GCC 7.2 2017-11-03 18:06:39 +03:00
apps Fixed minor issues reported by GCC 7.2 2017-11-03 18:06:39 +03:00
cmake cmake: simplified configuration output 2017-11-17 11:57:49 +03:00
data fixing models to resolve XML violation issue 2017-06-13 09:42:15 +02:00
doc Merge pull request #10056 from akhilesh-k:master 2017-11-14 13:44:01 +03:00
include Merge pull request #7370 from souch55:Fixxn 2016-10-01 10:44:56 +00:00
modules Merge pull request #10093 from gdkessler/gdal_image_read_fix_10089 2017-11-20 15:07:24 +03:00
platforms Merge pull request #9907 from seiko2plus:vsxFixesImproves 2017-11-16 15:20:16 +00:00
samples Merge pull request #10008 from Smorodov:master 2017-11-17 05:41:18 +00:00
.gitattributes build: added VERSIONINFO resource 2017-06-20 15:45:21 +03:00
.gitignore git: .gitignore update 2017-11-07 17:24:48 +03:00
.tgitconfig Add tgit.icon project config 2014-02-26 17:46:52 +08:00
CMakeLists.txt cmake: simplified configuration output 2017-11-17 11:57:49 +03:00
CONTRIBUTING.md migration: github.com/opencv/opencv 2016-07-12 12:51:12 +03:00
LICENSE Update license year range to 2016 2016-01-18 10:11:01 +05:30
README.md Improve README (#9243) 2017-09-13 17:58:34 +03:00

OpenCV: Open Source Computer Vision Library

Resources

Contributing

Please read the contribution guidelines before starting work on a pull request.

Summary of the guidelines:

  • One pull request per issue;
  • Choose the right base branch;
  • Include tests and documentation;
  • Clean up "oops" commits before submitting;
  • Follow the coding style guide.