Commit Graph

250 Commits

Author SHA1 Message Date
mayeut 74e814358c Allow to write 3/5/7/9/11/13/15 bpp TIF files
Update uclouvain/openjpeg#729
2016-04-23 04:29:03 +02:00
mayeut 54393d9e38 Allow to read 3/5/7/9/11/13/15 bpp TIF files 2016-04-23 04:24:04 +02:00
Julien Malik 5e5f6999a8 Remove dead code in opj_dump 2016-04-09 18:34:11 +02:00
Stefan Weil 93a61459cd opj_decompress: Update error message
The png format is also supported, so add it to the message.
Remove also the unneeded blank character before \n.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-01 21:01:20 +01:00
mayeut ce26e523dd Fix compiler warnings 2015-11-01 16:56:50 +01:00
Stefan Weil 7dfcbf9d7b convert: Fix compiler warnings
Fix this and other similar compiler warnings:

src/bin/jp2/convert.c: In function ‘tga_readheader’:
src/bin/jp2/convert.c:595:5: warning:
 dereferencing type-punned pointer will break strict-aliasing rules
 [-Wstrict-aliasing]
     cmap_len = get_ushort(*(unsigned short*)(&tga[5]));

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-01 16:54:38 +01:00
Stefan Weil 4ac509182a convert: Remove unneeded type casts
Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-11-01 16:53:55 +01:00
Stefan Weil ad7eb5630e Fix format strings and unneeded assignment
The static code analyzer cppcheck warns about unsigned integers
which use "%d" in the format string.

It also warns about an unneeded assignment.

Fix both issues.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-10-18 19:52:57 +02:00
Stefan Weil c8ae3c5225 Fix warnings for C++
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-10-07 20:53:57 +02:00
mayeut cf352af089 Fix up-scaling bit depth
Fixes #609
2015-09-29 09:28:34 +02:00
Stefan Weil 99fc1ab306 Fix typos in comments and string
Most typos were found by codespell.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
2015-09-29 05:55:43 +02:00
mayeut 838dfb8058 Provide safer string copy than strncpy
As per @boxerab suggestion in commit
b9ca882749
2015-09-25 22:04:58 +02:00
mayeut 4da7e9617f Fix resource leak 2015-09-25 00:39:05 +02:00
mayeut b9ca882749 Fix resource leaks & unchecked resource allocations 2015-09-25 00:08:34 +02:00
mayeut f9df8ba19a Fix some resource leaks 2015-09-24 23:32:03 +02:00
mayeut f82d7f3a63 Use buffer on stack to read TGA header
Fixes a potential leak
Fixes #601
2015-09-23 21:17:06 +02:00
mayeut faf63fddad Fix warning in rle4 decoding 2015-09-23 21:09:19 +02:00
mayeut 49cbc11a19 Correct leak in color_cielab_to_rgb 2015-09-13 14:42:56 +02:00
mayeut 8a95efcd3f Fix some UBSan warnings 2015-08-23 11:43:38 +02:00
mayeut f98df1c715 TIFF can output CMYK 2015-08-21 19:54:22 +02:00
Matthieu Darbois 3109759fd7 Merge pull request #559 from szukw000/cmyk-cielab-esycc
Add support for CIELab, EYCC and CMYK
2015-08-21 19:48:31 +02:00
szukw000 238f4419ab Defines three new functions
Declares three new functions
Calls the three new functions
Collects data for CIELab, sets the color_space for EYCC and CMYK
2015-07-30 23:31:12 +00:00
ak-dxdy acbb297a0a Small correction + attempt to understand git-openjpeg workflow 2015-07-31 00:51:31 +02:00
mayeut 15e4168ee2 Remove some warnings when building
Update #442
2015-07-26 19:19:31 +02:00
mayeut 2452bb7c45 Remove some warnings when building
Update #442
2015-07-26 19:01:52 +02:00
mayeut f3dad25c77 Update convert for PNG output
Update uclouvain/openjpeg#264
2015-07-26 18:28:03 +02:00
mayeut e6cf1744d4 Remove some warnings when building
Update #442
2015-07-26 13:41:59 +02:00
mayeut c423cc84e7 Remove some warnings when building
Update #442
2015-07-26 02:41:39 +02:00
mayeut ffd9db9700 Remove some warnings when building
Update #442
2015-07-25 03:16:16 +02:00
mayeut b190a91ab5 Remove some warnings when building
Update #442
2015-07-24 23:55:45 +02:00
mayeut 5bb074611a Update PNG support
Only input modified for now
Update uclouvain/openjpeg#536
Update uclouvain/openjpeg#264
2015-07-19 17:42:11 +02:00
mayeut 46c1dd22fc Correct error message for invalid TIFF input 2015-07-19 15:01:12 +02:00
mayeut b88025b38f Add headers to CMake target 2015-07-18 01:50:17 +02:00
mayeut 8048bbc7a2 Add tests for TIFF input with Alpha channel
Update uclouvain/openjpeg#322
2015-07-18 00:07:04 +02:00
mayeut 635a358962 Fix build warnings in converttif.c 2015-07-16 06:51:21 +02:00
mayeut 8f798864a9 Update imagetotif to support more output TIF formats
Update uclouvain/openjpeg#322
Update uclouvain/openjpeg#264
2015-07-16 00:26:02 +02:00
mayeut ac9fb5a302 Update tiftoimage to support more input TIF formats
Update uclouvain/openjpeg#322
Update uclouvain/openjpeg#264
2015-07-14 23:51:02 +02:00
mayeut dc43ebf96c Add option to force component splitting in imagetopnm
Update uclouvain/openjpeg#289
2015-07-11 11:35:21 +02:00
Antonin Descampe eadfad7a50 commented out printf line 2015-07-03 17:36:39 +02:00
Antonin Descampe 14361eee24 commented out a printf line 2015-07-03 16:35:16 +02:00
Aaron Boxer 6347686385 fixed a few bugs 2015-07-03 15:22:58 +02:00
Aaron Boxer 56d3f5af6e add timing to compress and decompress 2015-07-03 15:20:11 +02:00
Matthieu Darbois 6def7e38b4 [trunk] Fix wrong return value for opj_setup_encoder & opj_set_decoded_resolution_factor (fixes issue 497)
Thanks Aaron.
2015-05-29 21:58:08 +00:00
Matthieu Darbois 73881d0e52 [trunk] Fix sscanf format specifier (fixes issue 494)
Thanks Aaron.
2015-05-28 22:16:49 +00:00
Antonin Descampe 8b5e2a5143 [trunk] fixes a bug that prevented opj_decompress to take directory as input (fixes issue 463)
Thanks Aaron.
2015-02-02 16:11:23 +00:00
Matthieu Darbois 42132ed6b5 [trunk] removed warning from convertbmp.c
Update  issue 442
2014-12-27 11:31:43 +00:00
Matthieu Darbois 31f5efe453 [trunk] fixed typo in opj_decompress (fixes issue 465) 2014-12-26 15:37:16 +00:00
Matthieu Darbois 33f52fb611 [trunk] removed warning from convert.c
Update  issue 442
2014-12-23 16:03:45 +00:00
Matthieu Darbois 81abe5b3bb [trunk] fixed imagetoraw unsigned 16bits conversion (fixes issue 460) 2014-12-23 15:06:23 +00:00
Matthieu Darbois 4a09296771 [trunk] removed warning from convertbmp.c
Update  issue 442
2014-12-23 10:13:28 +00:00
Matthieu Darbois 6922124c4c [trunk] fixed colorspace mapping for raw grayscale images (fixes issue 456) 2014-12-22 18:39:14 +00:00
Matthieu Darbois 59b844347c [trunk] fixed component precision upscaling in opj_decompress (fixes issue 458) 2014-12-22 15:50:32 +00:00
Matthieu Darbois 16240e21f9 [trunk] updated BMP format input support
Update  issue 203
2014-12-22 14:40:31 +00:00
Matthieu Darbois 33a0e66eb1 [trunk] updated BMP format input support
Update  issue 203
2014-12-22 13:14:37 +00:00
Matthieu Darbois f1bae45c76 [trunk] fixed BMP reading for 8bpp when width & 3 == 1
Update  issue 203
2014-12-20 18:45:53 +00:00
Matthieu Darbois c0710f557c [trunk] Fixed invalid check in in tiff reading method (fixes issue 449) 2014-12-11 20:21:26 +00:00
Matthieu Darbois 04ace2a558 [trunk] Fixed typo in opj_compress error report (fixes issue 350) 2014-12-02 20:18:50 +00:00
Matthieu Darbois 570dd13f55 [trunk] removed some warnings when configuring with CMake 3.x on MacOS
Update  issue 443

Warnings related to OPJ_USE_DSYMUTIL are fixed
2014-11-25 21:52:24 +00:00
Matthieu Darbois 63f877769c [trunk] removed some warnings when building src/bin/jp2/convert.c
Update  issue 442
2014-11-25 20:06:12 +00:00
Matthieu Darbois 131cc98491 [trunk] added an option to upsample image components in opj_decompress
Update  issue 289

Issue is left open since there's still one image failing the tests.
2014-11-22 17:59:07 +00:00
Matthieu Darbois 13bcb63b73 [trunk] fixed pnmtoimage for odd pgm files (fixes issue 294) 2014-11-22 14:09:16 +00:00
Matthieu Darbois 0ba5d15b58 [trunk] fixed warning in option to force rgb output in opj_decompress (fixes issue 282) 2014-11-22 12:30:04 +00:00
Matthieu Darbois 7e38446075 [trunk] added option to force rgb output in opj_decompress (fixes issue 282 , fixes issue 286) 2014-11-22 00:04:39 +00:00
Matthieu Darbois 3bc360fc9d [trunk] added option to force output bit depth in opj_decompress (fixes issue 283) 2014-11-19 20:05:39 +00:00
Antonin Descampe cf5153c518 [trunk] add a cdef box when alpha component is present (fixes issue 416) 2014-11-03 14:12:01 +00:00
Antonin Descampe 984351f86f [trunk] Add option to call dsymutil on built binaries (fixes issue 409) 2014-10-15 10:24:49 +00:00
Antonin Descampe 1acfa211ae [trunk] fixes heap-buffer-overflow in parse_cmdline_encoder
Fixes issue 403
Thanks Matthieu
2014-09-30 09:48:26 +00:00
Antonin Descampe 50a205d20f [trunk] improve memory management (fixes issue 359) 2014-09-16 15:48:04 +00:00
Antonin Descampe 7d21871ed8 [trunk] fixes issue #357. MCT is automatically disabled when
subsamppling is detected.
2014-07-03 09:15:13 +00:00
Antonin Descampe a38b97fae0 [trunk] moved comment marker setup from opj_compress to the library 2014-07-01 13:51:55 +00:00
Mathieu Malaterre 4bac8488df [trunk] Properly handle failure to compress (remove file)
Fixes issue 323
2014-04-28 07:54:33 +00:00
Mathieu Malaterre 997758f91c [trunk] properly handle pkg-config on non-UNIX hosts
Fixes issue 340
2014-04-28 07:34:26 +00:00
Antonin Descampe 7924d3a456 [trunk]removed '-x' option for index file as long as it's broken 2014-04-23 15:19:57 +00:00
Antonin Descampe ec84bafcd8 [trunk]re-formatted help display in executables 2014-04-23 14:09:20 +00:00
Antonin Descampe 08c09b74cf [trunk]formatted some messages. Removed -version option to disambiguate
with -v(erbose) option, added version info in help display
2014-04-23 09:12:30 +00:00
Antonin Descampe 7aece5e8e7 [trunk]Replaced deprecated opj_stream_set_user_data function from API
with its 'v3' version, and removed all other 'v3' suffixes from API.
2014-04-23 07:46:11 +00:00
Antonin Descampe 8d93eae64a [trunk] fixed some warning and errors formatting and add a '-version'
option to opj_compress and opj_decompress binaries
2014-04-22 21:22:49 +00:00
Antonin Descampe 7199d9b5d3 [trunk] refactoring of rsiz, profiles, and extensions management 2014-04-17 09:31:37 +00:00
Antonin Descampe d19a4ab676 [trunk] updated copyright and added copyright notice required by ISO, in each file; updated AUTHORS, NEWS 2014-04-03 15:30:57 +00:00
Antonin Descampe 4db4198722 [trunk] fixed a bug triggering SEGFAULT on debug mode (uninitialized
structure)
2014-04-02 16:25:40 +00:00
Antonin Descampe a54d757a3e [trunk] fixed warnings triggered on linux related to r2802 2014-03-26 15:17:17 +00:00
Antonin Descampe f1d69068c7 [trunk] add ability in opj_compress to input subsampled images through
'-F' (aka raw option). Let the user input raw images with 444, 422, 420
(etc) subsampling. To be used in conjunction with '-mct 0' option to
compress subsampled YCC images.
2014-03-26 14:26:49 +00:00
Mathieu Malaterre 9ba6bc6042 [trunk] Make sure to test value not pointer
Update issue 302
2014-03-25 16:34:59 +00:00
Antonin Descampe 5e1a0fad08 [trunk] fixed bug related to r2791 2014-03-25 15:35:33 +00:00
Antonin Descampe 666f71b2a1 [trunk] fixed warning due induced by r2791 2014-03-25 13:29:11 +00:00
Antonin Descampe 2b7d5b18f3 [trunk] add "-mct {0,1,2}" option to opj_compress to allow MCT to be
disabled if needed.
2014-03-25 12:38:29 +00:00
Mathieu Malaterre 18d5d25cb6 [trunk] Make sure to not use alpha pointer if it is not an RGBA input
Fixes issue 310
2014-03-25 11:47:34 +00:00
Mathieu Malaterre 18c5be69e9 [trunk] Make sure to exit early instead of looping on every single pixels 2014-03-24 16:01:51 +00:00
Mathieu Malaterre 5a70e97f51 [trunk] Fix typo in comment (this is not j2k_dump) 2014-03-24 09:49:04 +00:00
Mathieu Malaterre ae49fd1aa9 [trunk] Update big endian handling no such thing as WORDS_BIGENDIAN (prefer OPJ_BIG_ENDIAN)
Update issue 302
2014-03-18 14:37:33 +00:00
Mathieu Malaterre de74605777 [trunk] Fix issue with & vs &&
Fixes issue 277
2014-03-14 14:46:40 +00:00
Mathieu Malaterre e8abf1fb25 [trunk] Add internal implementation to dump all tiles/comp info
Eg: opj_dump -f 8 -i input.j2k
Update issue 3
2014-03-14 13:53:36 +00:00
Mathieu Malaterre 138a65d6c1 [trunk] Move INLINE definition within openjpeg.h header since application may use it 2014-03-14 12:02:05 +00:00
Mathieu Malaterre 5624e4a25f [trunk] Always report when decompression failed as return code value 2014-03-13 12:31:41 +00:00
Mathieu Malaterre b01c1240cf [trunk] Fix simple sign conversion warnings only visible on 32bits arch 2014-03-10 12:22:56 +00:00
Mathieu Malaterre 9a52b30c3d [trunk] Properly handle PGM file generation when fullpath is specified in the cmd line
This will break a very old behavior (since 2005), but avoid writing in un-expected places for users
This also make the behavior similar with PGX file generation
2014-03-10 10:52:09 +00:00
Mathieu Malaterre 666ef53fd2 [trunk] Make sure to always initialize variable 2014-03-10 08:40:02 +00:00
Mathieu Malaterre e02ba05034 [trunk] Fix warnings about shadow variables 2014-03-10 08:25:08 +00:00
Mathieu Malaterre f54de95802 [trunk] Upon failure, need to return proper return code 2014-03-07 17:23:19 +00:00
Mathieu Malaterre 956b1a7697 [trunk] Another round of fixes for sign conversion warnings.
Update issue 256
2014-03-07 12:06:00 +00:00
Mathieu Malaterre 472ce19183 [trunk] Another round of fixes for sign conversion warnings.
Update issue 256
2014-03-07 12:01:41 +00:00
Mathieu Malaterre 740924fa61 [trunk] Another round of fixes for sign conversion warnings.
Update issue 256
2014-03-07 11:59:29 +00:00
Mathieu Malaterre 22d11a9ccb [trunk] Remove mem leak and warning reported by clang 2014-03-07 11:17:51 +00:00
Mathieu Malaterre fc9248ea2b [trunk] Remove simple warnings about format 2014-03-07 11:11:43 +00:00
Mathieu Malaterre 016b9fc052 [trunk] Fix compilation in visual studio, inline cannot be used directly.
Fixes issue 272
2014-03-07 09:15:27 +00:00
Mathieu Malaterre dd5c3a9c8e [trunk] Remove some easy warnings 2014-03-06 16:29:03 +00:00
Mathieu Malaterre 93bc3cb628 [trunk] Remove warning about sign conversion.
Update issue 256
2014-03-06 16:01:23 +00:00
Mathieu Malaterre 7e64eb5414 [trunk] Remove some easy warnings about sign compare reported by gcc 2014-03-06 15:00:41 +00:00
Mathieu Malaterre 872368d25c [trunk] Remove another warning. ftell returns long int
Update issue 256
2014-03-04 09:32:19 +00:00
Mathieu Malaterre 36320b4bf4 [trunk] Remove more conversion warnings.
Update issue 256
2014-03-04 09:30:07 +00:00
Mathieu Malaterre 11f402b44a [trunk] Remove easy to fix warnings about conversion 2014-03-03 12:00:24 +00:00
Mathieu Malaterre b330c10492 [trunk] remove some simple warnings about unused params 2014-03-03 11:40:59 +00:00
Mathieu Malaterre a149502c01 [trunk] Remove some simple warnings about var being set but not used 2014-03-02 10:23:05 +00:00
Mathieu Malaterre decace60da [trunk] Remove warning about -2147483648 (aka INT_MIN), causing this decimal constant is unsigned only in ISO C90 2014-03-02 10:20:57 +00:00
Mathieu Malaterre 6d0785a78f [trunk] Fix compilation on MSVC compiler 2014-03-01 10:41:46 +00:00
Mathieu Malaterre ec593a2549 [trunk] Partially rework r2506, original patch from issue 171 was totally bogus (untested?) and did break most of the test (eg. p1_04 family)
convert.c duplicate a lot of code, this patch only adresses the PGX codec section of the code.
Update issue 171
Update issue 264
2014-02-28 17:29:28 +00:00
Mathieu Malaterre 1eb67ca49d [trunk] Remove some simple warnings in opj_dump 2014-02-28 12:06:57 +00:00
Mathieu Malaterre 7a89d731f7 [trunk] Merge final patch from issue 171 with code simplification. also handles signed case properly.
Fixes issue 171
2014-02-28 09:52:35 +00:00
Mathieu Malaterre 6a6fa7027a [trunk] Import patch from issue 171. Only the imagetoraw part was not applied.
Update issue 171
2014-02-27 17:04:06 +00:00
Mathieu Malaterre 7c120281c7 [trunk] improve command line parser syntax checking 2014-02-27 10:02:46 +00:00
Mathieu Malaterre c4317177f3 [trunk] Remove simple warnings about unused functions 2014-02-26 09:46:01 +00:00
Mathieu Malaterre e231a84b2f [trunk] Properly store and use value returned by fread. Also invert nmemb and size in fread call.
Fixes issue 262
2014-02-26 09:40:19 +00:00
Mathieu Malaterre 3ca312033f [trunk] Clarify raw input in openjpeg. LSB vs MSB are now documented.
Fixes issue 62
2014-02-25 10:35:07 +00:00
Mathieu Malaterre 228e0a3d79 [trunk] Fix a simple mem leak 2014-02-24 14:55:32 +00:00
Antonin Descampe 780120c9a2 [trunk] moved logic related to cinema profiles in library (was in
opj_compress.c). This enables one using the library with its own
executable to easily ask for cinema profiles.
2014-02-12 16:16:21 +00:00
Antonin Descampe d6c0c85125 [trunk] added a warning when tif conversion changes input image bitdepth 2014-02-12 15:16:36 +00:00
Antonin Descampe c81fb397bb [trunk]re-indenting convert.c 2014-02-12 14:56:49 +00:00
Antonin Descampe d143f49a66 [trunk] fixed another DCI compliance bug 2014-01-23 09:39:02 +00:00
Antonin Descampe ee3f2ffa19 [trunk] fixed several bugs in cinema mode (2K 24/48 fps, and 4K). Trunk
now produces compliant DCI code-streams.
2014-01-22 18:41:34 +00:00
Antonin Descampe c59124dfe2 [trunk] fixed indentation in opj_compress.c, renamed 2 internal
functions, added some comments
2014-01-16 14:21:14 +00:00
Mickael Savinaud bf0fa4089f [trunk] enhance the support of sYCC into opj_decompress application (thanks winfried). 2013-03-24 23:12:41 +00:00
Mickael Savinaud a13e4a77e0 [trunk] use everywhere the new opj_ prefix for HAVE variables and use the opj_apps_config file (thanks to winfried) 2013-03-17 17:03:00 +00:00
Mickael Savinaud e7bc30b409 [trunk] split into two config files config options related to the lib and to the application. 2013-03-03 17:55:35 +00:00
Mickael Savinaud af58e8e8f9 [trunk] move to the new API for function opj_stream_create_default_file_stream. Use now opj_stream_create_default_file_stream_v3 (WIP) 2013-02-17 10:34:31 +00:00
Mickael Savinaud 4bf4a7668e [trunk] move to the new API for function opj_stream_destroy. Use now opj_stream_destroy_v3 (WIP) 2013-02-16 17:39:23 +00:00
Mickael Savinaud 0109b39f58 [trunk] update convert about png writing with additional metadata (thanks winfried) 2013-02-03 10:18:10 +00:00
Mickael Savinaud 583df79be9 [trunk]rename the cinema option to old one 2012-11-15 19:24:51 +00:00
Mickael Savinaud d5efeb7df5 [trunk]update the copyright, the authors and thanks to respect the license 2012-11-15 15:22:29 +00:00
Mickael Savinaud f07c1a11a0 [trunk]rename decompress options with the goog name 2012-11-15 14:29:38 +00:00
Mickael Savinaud e212154d8d [trunk]extend last commits to apps 2012-11-15 13:38:35 +00:00
Mathieu Malaterre e189679ebc [trunk] Merge back JPIP modification into v2
This commit imports changes from openjpip.c from r2122 into openjpeg.c
2012-10-29 10:12:03 +00:00
Mathieu Malaterre 98682e1073 [trunk] Remove some warnings about missing prototypes (gcc) 2012-10-15 15:47:56 +00:00
Mathieu Malaterre 75b7104724 [trunk] remove left-over from ->jpip_on implementation. JPIP is now completely removed from openjp2 and openmj2. Document jpip_iptr_offset variable 2012-10-15 07:38:10 +00:00
Mickael Savinaud 37ff9b029c [trunk] remove warnings 2012-10-05 08:18:55 +00:00
Mathieu Malaterre f501186b18 [trunk] Fix minor cmake style 2012-10-01 12:29:09 +00:00
Mathieu Malaterre 93761d9ab5 [trunk] FolderReorgProposal task: move source code to source dir 2012-10-01 07:49:52 +00:00
Mathieu Malaterre bb16d8816c [trunk] FolderReorgProposal task: only keep a single build system 2012-10-01 07:33:59 +00:00
Mathieu Malaterre 95f06f0591 [trunk] FolderReorgProposal task: fix JPWL
Update issue 177
2012-09-28 09:26:51 +00:00
Mathieu Malaterre 3bf4d635f2 [trunk] FolderReorgProposal task: rename cli tools
Update issue 177
2012-09-28 09:12:22 +00:00
Mathieu Malaterre d518970039 [trunk] Start FolderReorgProposal task
Update issue 177
2012-09-28 08:11:41 +00:00