Commit Graph

155 Commits

Author SHA1 Message Date
Julien Malik 17a0a8a195 Use lowercase for cmake commands consistenly
Inspired from https://github.com/InsightSoftwareConsortium/ITK/blob/master/Utilities/Maintenance/HowToCreateTheCMakeCaseConversion.txt
This needs vim 7.3 and fails with vim 7.4

This also fixes a number of :
- missing empty line at end of files
- useless space at end of lines
2016-05-02 16:05:41 +02:00
mayeut f40a2ff2ad Fix bad call to fclose with NULL pointer 2016-04-30 01:50:33 +02:00
Matthieu Darbois 15f081c896 Fix Out-Of-Bounds Read in sycc42x_to_rgb function (#745)
42x Images with an odd x0/y0 lead to subsampled component starting at the
2nd column/line.
That is offset = comp->dx * comp->x0 - image->x0 = 1

Fix #726
2016-04-30 00:33:27 +02:00
julienmalik 319fc971fe cppcheck fix for openjp2 (#740) 2016-04-29 23:49:17 +02:00
julienmalik e982d03966 Fix implicit float-to-bool conversions (#752) 2016-04-28 11:52:45 +02:00
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