Commit Graph

64 Commits

Author SHA1 Message Date
Matthieu Darbois f053508f6f Fix PNM file reading (#847)
Malformed PNM file could cause a crash in opj_compress.
Checks were added to prevent this.

Fixes #843
Updates #440
2016-09-22 08:16:36 +02:00
mayeut f40a2ff2ad Fix bad call to fclose with NULL pointer 2016-04-30 01:50:33 +02:00
julienmalik 319fc971fe cppcheck fix for openjp2 (#740) 2016-04-29 23:49:17 +02: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
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 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
ak-dxdy acbb297a0a Small correction + attempt to understand git-openjpeg workflow 2015-07-31 00:51:31 +02:00
mayeut f3dad25c77 Update convert for PNG output
Update uclouvain/openjpeg#264
2015-07-26 18:28:03 +02:00
mayeut c423cc84e7 Remove some warnings when building
Update #442
2015-07-26 02:41:39 +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 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
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 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 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 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 13bcb63b73 [trunk] fixed pnmtoimage for odd pgm files (fixes issue 294) 2014-11-22 14:09:16 +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 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 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 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 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 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 138a65d6c1 [trunk] Move INLINE definition within openjpeg.h header since application may use it 2014-03-14 12:02:05 +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 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 36320b4bf4 [trunk] Remove more conversion warnings.
Update issue 256
2014-03-04 09:30:07 +00:00
Mathieu Malaterre b330c10492 [trunk] remove some simple warnings about unused params 2014-03-03 11:40:59 +00:00