summaryrefslogtreecommitdiff
path: root/src/bin/jp2/converttif.c
AgeCommit message (Collapse)Author
2023-09-24Require `stdint.h` & `inttypes.h`mayeut
With #1450 which goes with 480cc9d49775d018c19ce0e01f6be27858d63d39 "Remove support for non-C99 compilers (like VS2010) that don't support snprintf()", support for MSVC versions prior to vs2015 is dropped: https://stackoverflow.com/questions/2915672/snprintf-and-visual-studio-2010 This means that all supported MSVC versions do have `stdint.h` & `inttypes.h` now. For non windows platforms, those headers were already mandatory. Make them mandatory for all builds.
2021-12-10Remove duplicate assignments in function tiftoimageStefan Weil
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2021-10-27opj_compress: add a -TargetBitDepth switch for TIFF output (#1384)msheby
Sometimes, given the same (16-bit TIF) input, one wants to generate a variety of J2C outputs (say, 16-, 12-, and 10-bit). This patch allows one to downsample input files, and so makes it easier to automate OpenJPEG in mass generation of J2Cs without having to pipe though an image processing program.
2021-10-21API: deprecate 'bpp' member in favor of 'prec'Even Rouault
in opj_image_comp and opj_image_comptparm structures. bpp was redundant with prec, and almost never set by the library, except by opj_image_create(). This change should hopefully not impact existing, working, users of the API, which should already have used prec to get things working. Fixes #1379
2021-09-12Use standard integer types for compatibility with libtiff 4.3.0 (#1377)Jamaika1
2020-04-01opj_decompress: add sanity checks to avoid segfault in case of decoding errorEven Rouault
Prevent crashes like: opj_decompress -i 0722_5-1_2019.jp2 -o out.ppm -r 4 -t 0 where 0722_5-1_2019.jp2 is https://drive.google.com/file/d/1ZxOUZg2-FKjYwa257VFLMpTXRWxEoP0a/view?usp=sharing
2018-10-31Fix some potential overflow issues (#1161)Stefan Weil
* Fix some potential overflow issues Put sizeof to the beginning of the multiplication to enforce that size_t instead of smaller integer types is used for the calculation. This fixes warnings from LGTM: Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'. It also allows removing some type casts. Signed-off-by: Stefan Weil <sw@weilnetz.de> * Fix code indentation Signed-off-by: Stefan Weil <sw@weilnetz.de>
2017-08-16tiftoimage(): fix read heap buffer overflow (#988)Even Rouault
The number of components is given only by TIFFTAG_SAMPLESPERPIXEL / tiSpp. Querying TIFFTAG_EXTRASAMPLES only give information about which channel is the alpha channel, but we mostly ignore it for now, so remove that part of the code.
2017-08-11Changes in converttif.c for PPC64szukw000
2017-08-08Fix remaining warningAntonin Descampe
format specifier mismatch in #975
2017-08-07Changes for converttif.c to fix tsize_tszukw000
2017-08-02First change on changes-for-afl-testsszukw000
2017-07-31Catch images broken by AFLszukw000
2017-05-09Reformat whole codebase with astyle.options (#128)Even Rouault
2016-04-23Allow to write 3/5/7/9/11/13/15 bpp TIF filesmayeut
Update uclouvain/openjpeg#729
2016-04-23Allow to read 3/5/7/9/11/13/15 bpp TIF filesmayeut
2015-10-07Fix warnings for C++Stefan Weil
g++ complains about invalid conversions like these ones: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive] error: invalid conversion from ‘void*’ to ‘opj_precision* {aka opj_prec*}’ [-fpermissive] Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-08-21TIFF can output CMYKmayeut
2015-07-26Update convert for PNG outputmayeut
Update uclouvain/openjpeg#264
2015-07-26Remove some warnings when buildingmayeut
Update #442
2015-07-19Correct error message for invalid TIFF inputmayeut
2015-07-18Add tests for TIFF input with Alpha channelmayeut
Update uclouvain/openjpeg#322
2015-07-16Fix build warnings in converttif.cmayeut
2015-07-16Update imagetotif to support more output TIF formatsmayeut
Update uclouvain/openjpeg#322 Update uclouvain/openjpeg#264
2015-07-14Update tiftoimage to support more input TIF formatsmayeut
Update uclouvain/openjpeg#322 Update uclouvain/openjpeg#264