Commit Graph

312 Commits

Author SHA1 Message Date
xiongzhen
2238ac7d59 Apply TIFFTAG_PREDICTOR option for LZW, DEFLATE and ADOBE_DEFLATE compression cases for smaller files. 2022-05-13 09:44:25 +03:00
OpenCV Pushbot
9712cc479b
Merge pull request #21963 from hellodoge:imwrite_fix 2022-05-12 09:02:54 +00:00
Jan Polák
dea0815199 Small imencode documentation improvement
It was previously not clear that the extension should include the period, [and I am not the only person that encountered this problem](https://stackoverflow.com/questions/4254460/opencv-could-not-find-encoder-for-the-specified-extension).

I assume that this is true for all supported extensions, but I haven't checked the source.
2022-05-11 14:57:38 +02:00
hellodoge
e4ed2d2e42 fix JpegEncoder::write
3rdparty/libjpeg-turbo/src/jpeglib.h:
`* NB: you must set up the error-manager BEFORE calling jpeg_create_xxx.`
2022-05-11 13:08:02 +03:00
Alexander Smorkalov
0ee2a58cdc Document defaults for JPEG settings. 2022-04-15 14:36:48 +03:00
Alexander Alekhin
2b7803dbac imgcodecs: add runtime checks to validate input
backport of commit: f9b1dbe2ac
2022-02-15 16:33:35 +00:00
Suleyman TURKMEN
2b5bb02817 Update imgcodecs.hpp 2022-01-23 01:24:34 +03:00
Alexander Alekhin
92651d228d Merge pull request #21329 from alalek:cmake_openexr_find_package 2021-12-24 11:56:12 +00:00
Alexander Alekhin
f43fec7ee6 cmake: use find_package(OpenEXR) to support OpenEXR 3+ 2021-12-24 00:21:48 +00:00
Alexander Alekhin
381d9bafdf imgcodecs: disable OpenEXR in runtime for 3rdparty source code
- builtin OpenEXR source code is outdated
- external OpenEXR distributions are allowed
2021-12-23 10:41:18 +00:00
nickjackolson
79d4e865fe Add warning message to imread()
Add a warning message using CV_LOG__WARNING().
This way api behaviour is preserved. Outputs are
the same but user gets an extra warning in case
fopen() fails to access image file for some reason.
This would help new users and also debugging
complex apps which use imread()

Signed-off-by: nickjackolson <metedurlu@gmail.com>
2021-11-18 21:19:05 +01:00
Harvey
ce68291d83 32bit rgb bmp file should not copy data as rgba 2021-10-21 16:47:27 +08:00
Stanislaw Halik
3d93675ff9 fix link error on shared libs with -MT 2021-10-12 17:50:31 +02:00
Nikolay Polyarniy
746bd47ce5 EXR reading: support Z channel if no Y channel 2021-06-02 15:53:32 +03:00
Smirnov Egor
1d7d18afba Document imwrite depth fallback 2021-05-12 19:55:58 +03:00
Alexander Alekhin
a1e2c4f338
Merge pull request #19655 from raaldrid:EXR_rw_alpha_support_16115 2021-03-05 16:54:31 +03:00
Rachel A
cc22a73d0f EXR alpha support for 4 channel reading and writing. Issue https://github.com/opencv/opencv/issues/16115. 2021-03-02 11:49:56 -08:00
Alexander Alekhin
5b16b190c1 Merge pull request #19543 from alalek:hotfix_19439 2021-02-16 16:05:09 +00:00
Alexander Alekhin
0885a79c28 imgcodecs(test): don't include png.h 2021-02-16 13:26:51 +00:00
Alexander Alekhin
d2d6eba16a cmake: fix add_apple_compiler_options() calls and OBJCXX handling 2021-02-13 18:37:30 +00:00
Zhuo Zhang
84a290097b
fix link order: put zlib after png/tiff/openexr
Previous link dependency: imgcodecs --> zlib --> libpng
this can generate imgcodecs shared lib, until Visual Studio integrated
with vcpkg, which will additionally specify LIBPATH, pointing to vcpkg
installed zlib (if any), which links the wrong zlib.

Fixed link dependency: imgcodecs --> libpng --> zlib
in this fixed case, symbols in zlib referenced in libpng will be found
in the build-from-source static zlib, instead of the vcpkg one.

related discussion:
- https://github.com/microsoft/vcpkg/issues/16165
- https://github.com/opencv/opencv/issues/17051
- https://github.com/opencv/opencv/issues/10576

MSVC linking order reference pages:
- https://docs.microsoft.com/en-us/cpp/build/reference/link-input-files?view=msvc-160
  for link order
- https://docs.microsoft.com/en-us/cpp/build/reference/linking?view=msvc-160
  LIB environment variable, for library file searching
- https://docs.microsoft.com/en-us/cpp/build/reference/libpath-additional-libpath?view=msvc-160
  LIBPATH option, for library file searching
2021-02-12 22:19:35 +08:00
Rachel A
650836d700 Exif parsing for PNG files to support Exif orientation tag. Moved decoder specific Exif parsing to JPEG and PNG decoders, respectively. Issue 16579 2021-02-09 10:35:27 -08:00
Zhuo Zhang
6e1da2ef91
Merge pull request #19203 from zchrissirhcz:fix-cvSaveImage
Fix cvSaveImage( ) function bug

* fix cvSaveImage crash

* replace emplace_back with {}, no C++11 required

* fix MacOSX build with vector's push_back
2020-12-24 16:58:16 +00:00
Suleyman TURKMEN
cc7f17f011 update documentation 2020-11-18 17:07:04 +03:00
Pavel Rojtberg
bc6a70c689 imwrite: multi-image overload for bindings 2020-10-16 11:27:09 +00:00
Alexander Alekhin
7dfe68cac6 imgcodecs: lazy on-demand codecs initialization 2020-09-13 11:14:56 +00:00
Florian Jung
f66fc199a2 Fix build of grfmt_jpeg2000.cpp
libjasper has recently changed `jas_matrix_get` from a macro to an inline function
(389951d071 in https://github.com/jasper-software/jasper), causing the build to fail.
2020-07-30 19:23:52 +02:00
Alexander Alekhin
3f13339071 Merge pull request #17728 from sturkmen72:patch-4 2020-07-06 23:01:27 +00:00
Maksim Shabunin
e8129429e9 imgcodecs: fix test build with disabled JPEG and PNG libs 2020-07-06 14:52:52 +03:00
Suleyman TURKMEN
2566d13100 Update documentation of imwrite() 2020-07-06 11:02:50 +03:00
okamotoR
0e69cddda2 add if block for indexed color images 2020-06-23 21:36:47 +09:00
Chris Ballinger
d81ac52ce2 Remove linking against AssetsLibrary framework 2020-05-16 12:47:50 -07:00
tpoisonooo
b11a3a0820 Update grfmt_pxm.cpp
remove comment in .ppm
2020-04-11 17:41:51 +03:00
Alexander Alekhin
6d85fa3fd2 imgcodecs(test): rework common I/O test, added grayscale mode 2020-03-27 21:34:51 +00:00
Alexander Alekhin
e9655cf646 Merge pull request #16697 from alalek:imgcodecs_jpeg_drop_unnecessary_code 2020-03-06 19:03:43 +00:00
Alexander Alekhin
4a39b12a78 imgcodecs(jpeg): drop unnecessary code
- standard huffman tables are handled by modern libjpeg-turbo
2020-02-28 18:55:14 +03:00
jshiwam
1f48940a93 bug fix to Inconsistent comment for EXIF issue id #15706 stream added final
removed all the changes occured while trying to resolve conflicts
2020-02-28 15:01:17 +05:30
Collin Brake
d4a28f3bf6 improved documentation for imread() 2020-02-07 08:54:34 -05:00
Collin Brake
3cc07a4411 improved documentation for IMREAD_UNCHANGED flag 2020-02-06 17:49:14 -05:00
Omar Hassan
8dd0fd8a13 If applied, this commit will describe permission denied message in imwrite_ function when user does not have write permission 2020-02-05 22:23:10 +05:00
Ganesh Kathiresan
80ade96c8c Merge pull request #16309 from ganesh-k13:bugfix/imdecode-resize
* Added flag handlers for imread and imdecode | Issue 16203

Undo imread change

Added Imread resize tests

Added imdecode flags check

Added imdecode tests for resize

Removed trailing whitespace

Removed IMREAD_IGNORE_ORIENTATION check

Added else condition

Removed IMREAD_IGNORE_ORIENTATION check in decode

Added HAVE_JPEG guards

Added static_cast for Win32

Added resize for non jpegs

Added tests for non jpeg resize case

Fixed resize value in assert

Changed tests to Value-Parameterized Tests

Changed tests to Value-Parameterized Tests | handled >> in cpp

Changed tests to Value-Parameterized Tests | removed trailing whitespace

* imgcodecs: update test
2020-01-20 14:00:45 +03:00
Janusz Lisiecki
178c4810e6 Fix swapped channels in BGR* conversion utility function
- some of `icvCvt_BGR*` functions have R with B channels
  swapped what leads to the wrong conversion
- renames misleading `rgb` variable name to `bgr`
- swap back the conversion coefficients, `cB` should be the first

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
2020-01-05 00:06:36 +01:00
Alexander Alekhin
f8b16fa293 Merge pull request #16188 from saskatchewancatch:issue-13551 2019-12-18 10:30:35 +00:00
Rajkiran Natarajan
af04b422c9 Change program type in hdr format files to modern value: RADIANCE so
modern readers that expect RADIANCE will read it
2019-12-17 20:17:32 -08:00
Alexander Alekhin
d1c35e7b61 imgcodecs(bmp): make happy UBSAN with enum value range check 2019-12-13 18:51:46 +03:00
Suleyman TURKMEN
d88d1c9935
Update loadsave.cpp 2019-09-28 23:24:17 +03:00
Alexander Alekhin
ad2854c8b3 imgcodecs: add check image.empty() in imwrite()/imencode() 2019-09-22 10:45:00 +00:00
luz.paz
fcc7d8dd4e Fix modules/ typos
Found using `codespell -q 3 -S ./3rdparty -L activ,amin,ang,atleast,childs,dof,endwhile,halfs,hist,iff,nd,od,uint`

backporting of commit: ec43292e1e
2019-08-16 17:34:29 +03:00
yaohai [姚海]
cadb4dee14 fix exif bug 2019-08-05 16:41:07 +03:00
Alexander Alekhin
eedbd1ad59 imgcodecs: force reshaping of imdecode() input into a single row
OpenCV upstream stuff may reinterpret vector as column.
2019-07-06 10:11:29 +00:00