imager.git
2 years agomore Changes updates
Tony Cook [Thu, 7 Mar 2019 03:12:28 +0000 (14:12 +1100)]
more Changes updates

2 years agodon't leak in DSO_open() on various failures
Tony Cook [Mon, 25 Feb 2019 23:18:51 +0000 (10:18 +1100)]
don't leak in DSO_open() on various failures

DSO_close() now releases memory allocated for the DSO handle.

CID 185309.

2 years agoi_img_make_palette() no longer leaks on quantization failure
Tony Cook [Mon, 25 Feb 2019 22:39:57 +0000 (09:39 +1100)]
i_img_make_palette() no longer leaks on quantization failure

CID 185566

2 years agotranslate_errdiff() could leak memory on failure
Tony Cook [Sat, 23 Feb 2019 03:45:41 +0000 (14:45 +1100)]
translate_errdiff() could leak memory on failure

Introduced when I added error handling

CID 185565

2 years agostart a jpeg dump tool
Tony Cook [Thu, 14 Feb 2019 22:24:52 +0000 (09:24 +1100)]
start a jpeg dump tool

2 years agoadd missing 070-mymeta.t to MANIFEST
Tony Cook [Thu, 14 Feb 2019 22:24:33 +0000 (09:24 +1100)]
add missing 070-mymeta.t to MANIFEST

2 years agoignore more rubbish in MANIFEST.SKIP
Tony Cook [Thu, 14 Feb 2019 22:24:18 +0000 (09:24 +1100)]
ignore more rubbish in MANIFEST.SKIP

2 years agopngdump: move options to the right place in the synopsis
Tony Cook [Thu, 14 Feb 2019 22:13:46 +0000 (09:13 +1100)]
pngdump: move options to the right place in the synopsis

2 years agobinmode the right handle
Tony Cook [Thu, 14 Feb 2019 22:13:25 +0000 (09:13 +1100)]
binmode the right handle

2 years agoChanges updates
Tony Cook [Thu, 14 Feb 2019 08:03:13 +0000 (19:03 +1100)]
Changes updates

2 years agocorrect the type of the im_decode_exif() data parameter
Tony Cook [Thu, 14 Feb 2019 08:01:47 +0000 (19:01 +1100)]
correct the type of the im_decode_exif() data parameter

const foo * and foo* have the same representation so this doesn't
break the ABI.

const unsigned char * will accept all parameter types it did previously.

The only issue is if someone makes a copy of the pointer, but I don't
support that.

2 years agoand the release date
Tony Cook [Wed, 13 Feb 2019 08:19:34 +0000 (19:19 +1100)]
and the release date

2 years agoadd the FT2 encoding symbol change to the main Changes file
Tony Cook [Wed, 13 Feb 2019 08:17:33 +0000 (19:17 +1100)]
add the FT2 encoding symbol change to the main Changes file

2 years agobump to Imager 1.010 v1.010
Tony Cook [Wed, 13 Feb 2019 08:12:27 +0000 (19:12 +1100)]
bump to Imager 1.010

2 years agofix method index entry for add_file_magic()
Tony Cook [Wed, 13 Feb 2019 08:10:43 +0000 (19:10 +1100)]
fix method index entry for add_file_magic()

2 years agonote GIF changes
Tony Cook [Wed, 13 Feb 2019 08:04:17 +0000 (19:04 +1100)]
note GIF changes

2 years agoupdate Changes
Tony Cook [Wed, 13 Feb 2019 07:16:31 +0000 (18:16 +1100)]
update Changes

2 years agotry to fix test failing on chorny's 5.18.2 smoker
Tony Cook [Wed, 13 Feb 2019 07:04:31 +0000 (18:04 +1100)]
try to fix test failing on chorny's 5.18.2 smoker

or at least diagnose it

2 years agoRT#128481: fix handling of GIF files with no images
Tony Cook [Tue, 12 Feb 2019 08:45:35 +0000 (19:45 +1100)]
RT#128481: fix handling of GIF files with no images

2 years agofix an embarassing typo
Tony Cook [Tue, 12 Feb 2019 07:29:54 +0000 (18:29 +1100)]
fix an embarassing typo

2 years agoadd the add_file_magic() class method
Tony Cook [Thu, 7 Feb 2019 11:27:15 +0000 (22:27 +1100)]
add the add_file_magic() class method

For now it's simple, I might extend it at some point to allow
for perl code or regexps for matching

2 years agoremove a pointless NULL check from i_img_destroy()
Tony Cook [Sun, 3 Feb 2019 08:44:15 +0000 (19:44 +1100)]
remove a pointless NULL check from i_img_destroy()

i_img_destroy() access the pointer twice before the check.

2 years agoremove a pointless NULL check from i_flipxy()
Tony Cook [Sun, 3 Feb 2019 08:40:43 +0000 (19:40 +1100)]
remove a pointless NULL check from i_flipxy()

im is deferred earlier to get the context, and passing a NULL or invalid
image pointer in is a bug in the caller.

2 years agorearrange i_new_hatch_low() in fills.c
Tony Cook [Sat, 2 Feb 2019 01:32:07 +0000 (12:32 +1100)]
rearrange i_new_hatch_low() in fills.c

The code used to be a bunch of conditional expressions, which some
Sun C compiler complained about.

Rearrange the code to be a lot more obvious.

Related to CID 185339.

2 years agoadd assertions for callers to i_new_hatch_low() in fills.c
Tony Cook [Sat, 2 Feb 2019 01:28:02 +0000 (12:28 +1100)]
add assertions for callers to i_new_hatch_low() in fills.c

coverity complained that effectively both fg and ffg could be NULL
which isn't the case.  Try to let it know better.

I'm going to rearrange i_new_hatch_low() in the next commit.

CID 185339.

2 years agoensure bmp.c read_packed() calls va_end()
Tony Cook [Sat, 2 Feb 2019 01:11:11 +0000 (12:11 +1100)]
ensure bmp.c read_packed() calls va_end()

CID 185329.

2 years agoadd lint comments where switch() case fallthough is expected in tga parsing
Tony Cook [Sat, 2 Feb 2019 00:50:09 +0000 (11:50 +1100)]
add lint comments where switch() case fallthough is expected in tga parsing

CID 185328.

2 years agoavoid a possible sign-extension for offsets/sizes in SGI
Tony Cook [Sat, 2 Feb 2019 00:45:04 +0000 (11:45 +1100)]
avoid a possible sign-extension for offsets/sizes in SGI

and why is that using + instead of | ?

CID 185326.

2 years agolint comment for the end of pixel_coverage() not reachable
Tony Cook [Sat, 2 Feb 2019 00:31:29 +0000 (11:31 +1100)]
lint comment for the end of pixel_coverage() not reachable

I had compilers complaining about a missing return at the end of
the function, as added a return.  Coverity complains about the
return.

CID 185325.

2 years agoadd missing va_end() in bmp.c's write_packed()
Tony Cook [Sat, 2 Feb 2019 00:29:19 +0000 (11:29 +1100)]
add missing va_end() in bmp.c's write_packed()

In general it wasn't calling va_end() on a write failure.

CID 185320.

2 years agoforgot to document 127575 fix
Tony Cook [Mon, 14 Jan 2019 00:43:29 +0000 (11:43 +1100)]
forgot to document 127575 fix

2 years agouse non-deprecated encoding ids for freetype 2
Tony Cook [Mon, 14 Jan 2019 00:29:53 +0000 (11:29 +1100)]
use non-deprecated encoding ids for freetype 2

2 years agobump gif version
Tony Cook [Mon, 14 Jan 2019 00:29:20 +0000 (11:29 +1100)]
bump gif version

2 years agofix date on 1.009 release in Changes
Tony Cook [Sun, 13 Jan 2019 05:40:12 +0000 (16:40 +1100)]
fix date on 1.009 release in Changes

2 years agoupdate FT2 Changes
Tony Cook [Fri, 11 Jan 2019 09:14:26 +0000 (20:14 +1100)]
update FT2 Changes

2 years agoupdate Changes
Tony Cook [Fri, 11 Jan 2019 09:12:31 +0000 (20:12 +1100)]
update Changes

2 years ago1.009 release v1.009
Tony Cook [Fri, 11 Jan 2019 09:07:28 +0000 (20:07 +1100)]
1.009 release

2 years agomost numeric parameters to the XS implementation now throw an exception if supplied...
Tony Cook [Fri, 11 Jan 2019 08:46:14 +0000 (19:46 +1100)]
most numeric parameters to the XS implementation now throw an exception if supplied an unoverloaded reference.

2 years agoi_circle_aa_low() could buffer overflow
Tony Cook [Thu, 10 Jan 2019 12:24:43 +0000 (23:24 +1100)]
i_circle_aa_low() could buffer overflow

prevent it.  It still needs some work for other reasons.

2 years agoexplain why not all the Coverity issues are addressed
Tony Cook [Wed, 9 Jan 2019 09:12:20 +0000 (20:12 +1100)]
explain why not all the Coverity issues are addressed

2 years agoon't check if the unsigned size supplied to im_set_image_file_limits() is negative
Tony Cook [Mon, 7 Jan 2019 12:18:56 +0000 (23:18 +1100)]
on't check if the unsigned size supplied to im_set_image_file_limits() is negative

2 years agoextend some variable types to avoid overflows for mediancut
Tony Cook [Mon, 7 Jan 2019 12:13:10 +0000 (23:13 +1100)]
extend some variable types to avoid overflows for mediancut

for very large images

2 years agodon't check if the unsigned size passed to mymalloc is negative.
Tony Cook [Mon, 7 Jan 2019 11:59:50 +0000 (22:59 +1100)]
don't check if the unsigned size passed to mymalloc is negative.

2 years agohopefully avoid coverity complaining about a float vs int comparison
Tony Cook [Mon, 7 Jan 2019 11:54:04 +0000 (22:54 +1100)]
hopefully avoid coverity complaining about a float vs int comparison

2 years agoprevent an unsigned overflow in FT1 has_chars() implementation
Tony Cook [Mon, 7 Jan 2019 11:37:19 +0000 (22:37 +1100)]
prevent an unsigned overflow in FT1 has_chars() implementation

2 years agomap() would corrupt a channel if there was a gap in the arrayref of channels.
Tony Cook [Mon, 7 Jan 2019 11:31:33 +0000 (22:31 +1100)]
map() would corrupt a channel if there was a gap in the arrayref of channels.

2 years ago(rt #127575) link to Imager::Install from Imager::Files
Tony Cook [Mon, 7 Jan 2019 11:01:21 +0000 (22:01 +1100)]
(rt #127575) link to Imager::Install from Imager::Files

2 years agoi_img_info() (C API) no longer tries to handle a NULL image object pointer.
Tony Cook [Sun, 6 Jan 2019 04:16:01 +0000 (15:16 +1100)]
i_img_info() (C API) no longer tries to handle a NULL image object pointer.

2 years agofix an unsigned comparison when converting character code to a glyph index with a...
Tony Cook [Sun, 6 Jan 2019 04:11:01 +0000 (15:11 +1100)]
fix an unsigned comparison when converting character code to a glyph index with a NULL character map

2 years agohandle failure to clone the log filehandle when cloning the Imager context
Tony Cook [Sun, 6 Jan 2019 04:03:55 +0000 (15:03 +1100)]
handle failure to clone the log filehandle when cloning the Imager context

2 years agoavoid ignoring the result of i_io_getc()
Tony Cook [Sat, 5 Jan 2019 03:33:22 +0000 (14:33 +1100)]
avoid ignoring the result of i_io_getc()

Coverity complained about *(ig->read_ptr++) because the result of the *
operator was ignored, which was deliberate.

I could simply had added a void cast, but given i_io_peekc(),
I could see a macro that skips the * being simpler to read, adding
i_io_nextc(), which is exposed as the nextc() method on Imager::IO
objects.

2 years agoinvalid quantization options now result in an error rather than defaults
Tony Cook [Sat, 5 Jan 2019 03:09:01 +0000 (14:09 +1100)]
invalid quantization options now result in an error rather than defaults

2 years agosimplify XS for i_img_to_pal()
Tony Cook [Thu, 3 Jan 2019 22:38:50 +0000 (09:38 +1100)]
simplify XS for i_img_to_pal()

2 years agofixes to the fountain filter
Tony Cook [Thu, 3 Jan 2019 11:10:17 +0000 (22:10 +1100)]
fixes to the fountain filter

2 years agoavoid dead code in i_t1_glyph_names().
Tony Cook [Wed, 2 Jan 2019 08:33:16 +0000 (19:33 +1100)]
avoid dead code in i_t1_glyph_names().

2 years agoremove an unneeded check when terminating the stream for JPEG writing.
Tony Cook [Wed, 2 Jan 2019 08:28:09 +0000 (19:28 +1100)]
remove an unneeded check when terminating the stream for JPEG writing.

2 years agoJPEG Changes updates for older releases
Tony Cook [Wed, 2 Jan 2019 08:27:43 +0000 (19:27 +1100)]
JPEG Changes updates for older releases

2 years agohe unpack code for ICO/CUR file handling could extend 32-bit unsigned values to 64...
Tony Cook [Wed, 2 Jan 2019 08:19:56 +0000 (19:19 +1100)]
he unpack code for ICO/CUR file handling could extend 32-bit unsigned values to 64-bit signed.

2 years agoavoid an unneeded EXTEND() call when the FT2 has_chars() implementation returns 0.
Tony Cook [Wed, 2 Jan 2019 08:08:57 +0000 (19:08 +1100)]
avoid an unneeded EXTEND() call when the FT2 has_chars() implementation returns 0.

2 years agoavoid dead code in i_ft2_glyph_name()
Tony Cook [Wed, 2 Jan 2019 08:04:33 +0000 (19:04 +1100)]
avoid dead code in i_ft2_glyph_name()

2 years agoavoid dead code in i_get_anonymous_color_histo()
Tony Cook [Wed, 2 Jan 2019 07:56:32 +0000 (18:56 +1100)]
avoid dead code in i_get_anonymous_color_histo()

2 years agoavoid dead code in i_tt_glyph_names()
Tony Cook [Wed, 2 Jan 2019 07:50:48 +0000 (18:50 +1100)]
avoid dead code in i_tt_glyph_names()

CID 185321

2 years agogradgen allocated sizeof(i_color *) per entry rather than sizeof(i_color)
Tony Cook [Wed, 2 Jan 2019 07:39:28 +0000 (18:39 +1100)]
gradgen allocated sizeof(i_color *) per entry rather than sizeof(i_color)

i_color is four bytes, so this is safe on any arch I've used.

2 years agochange note for the has_chars and MakeMapObject changes
Tony Cook [Wed, 2 Jan 2019 07:36:54 +0000 (18:36 +1100)]
change note for the has_chars and MakeMapObject changes

2 years agoadd CIDs to the changes Coverity fixes
Tony Cook [Wed, 2 Jan 2019 07:30:44 +0000 (18:30 +1100)]
add CIDs to the changes Coverity fixes

2 years agolog only after we've checked MakeMapObject() success
Tony Cook [Wed, 2 Jan 2019 00:10:20 +0000 (11:10 +1100)]
log only after we've checked MakeMapObject() success

CID 185296

2 years agoavoid an unneeded check in the FT1 has_chars() method implementation
Tony Cook [Wed, 2 Jan 2019 00:09:04 +0000 (11:09 +1100)]
avoid an unneeded check in the FT1 has_chars() method implementation

2 years agofix a fence post error validating a combing mode number
Tony Cook [Tue, 1 Jan 2019 01:11:43 +0000 (12:11 +1100)]
fix a fence post error validating a combing mode number

2 years agochange an array parameter decl to a pointer style decl
Tony Cook [Tue, 1 Jan 2019 01:07:39 +0000 (12:07 +1100)]
change an array parameter decl to a pointer style decl

to avoid confusing coverity

2 years agoCoverity complained colors could be left uninitialized.
Tony Cook [Tue, 1 Jan 2019 01:04:30 +0000 (12:04 +1100)]
Coverity complained colors could be left uninitialized.

2 years agocoverity complained minset could be -1
Tony Cook [Tue, 1 Jan 2019 00:07:10 +0000 (11:07 +1100)]
coverity complained minset could be -1

but no callers call i_map() in such a way that it can happen.

Add a belt-and-suspenders check.

2 years agoImager::Color set_internal is now simpler
Tony Cook [Mon, 31 Dec 2018 11:34:06 +0000 (22:34 +1100)]
Imager::Color set_internal is now simpler

Coverity complained that ICL_set_internal() could leak here, but
that's only possible with a NULL pointer PTROBJ, which would break
in many other ways.

2 years agobetter validate numeric hatch values for fills
Tony Cook [Mon, 31 Dec 2018 11:22:01 +0000 (22:22 +1100)]
better validate numeric hatch values for fills

2 years agoadd braces to some multi-line if() and for()
Tony Cook [Mon, 31 Dec 2018 11:11:54 +0000 (22:11 +1100)]
add braces to some multi-line if() and for()

Coverity complained about this code

2 years agoaddi style makemap could potentially read one past the end of an array
Tony Cook [Mon, 31 Dec 2018 11:02:27 +0000 (22:02 +1100)]
addi style makemap could potentially read one past the end of an array

2 years agoagain, convert array style pointer parameter to pointer
Tony Cook [Mon, 31 Dec 2018 10:54:35 +0000 (21:54 +1100)]
again, convert array style pointer parameter to pointer

2 years agoinitialize a pointer to prevent coverity complaints
Tony Cook [Mon, 31 Dec 2018 10:49:51 +0000 (21:49 +1100)]
initialize a pointer to prevent coverity complaints

2 years agocoverity took the 6 elements in the argument as gospel
Tony Cook [Mon, 31 Dec 2018 10:44:42 +0000 (21:44 +1100)]
coverity took the 6 elements in the argument as gospel

2 years agofix potential memory leaks for failing mixing scaling on very large images
Tony Cook [Mon, 31 Dec 2018 10:34:38 +0000 (21:34 +1100)]
fix potential memory leaks for failing mixing scaling on very large images

2 years agofix double-free in TGA code
Tony Cook [Mon, 31 Dec 2018 10:25:19 +0000 (21:25 +1100)]
fix double-free in TGA code

2 years ago1.008 release v1.008
Tony Cook [Mon, 31 Dec 2018 09:52:15 +0000 (20:52 +1100)]
1.008 release

2 years agomove EXIF handling from the JPEG handler to core Imager
Tony Cook [Thu, 13 Dec 2018 00:15:10 +0000 (11:15 +1100)]
move EXIF handling from the JPEG handler to core Imager

and add it to the API.

The JPEG specific check was removed from the EXIF handling code
and inlined into the APP1 check in the JPEG decoder.

2 years agofix a dumb error in Imager::Probe
Tony Cook [Thu, 6 Dec 2018 09:50:52 +0000 (20:50 +1100)]
fix a dumb error in Imager::Probe

and add tests for loading Imager::Probe to reduce the chance of the
same problem happening again

2 years agoadd some more extensions, add add_type_extensions() class method
Tony Cook [Thu, 6 Dec 2018 09:43:18 +0000 (20:43 +1100)]
add some more extensions, add add_type_extensions() class method

2 years agosupport libbase as an arrayref for fake probing
Tony Cook [Thu, 6 Dec 2018 09:08:49 +0000 (20:08 +1100)]
support libbase as an arrayref for fake probing

2 years agoignore dist archives
Tony Cook [Sun, 2 Dec 2018 22:24:29 +0000 (09:24 +1100)]
ignore dist archives

2 years ago1.007 release v1.007
Tony Cook [Sat, 24 Nov 2018 01:45:15 +0000 (12:45 +1100)]
1.007 release

2 years agoupdate / correct PNG Changes file
Tony Cook [Sat, 24 Nov 2018 01:40:49 +0000 (12:40 +1100)]
update / correct PNG Changes file

2 years agodocument polygon() change
Tony Cook [Sat, 24 Nov 2018 01:33:50 +0000 (12:33 +1100)]
document polygon() change

2 years agoimprove error reporting for the polygon method
Tony Cook [Sat, 24 Nov 2018 01:32:41 +0000 (12:32 +1100)]
improve error reporting for the polygon method

2 years agoadd probe support for FLIF files
Tony Cook [Fri, 23 Nov 2018 00:14:43 +0000 (11:14 +1100)]
add probe support for FLIF files

(this doesn't add support for the file format, just detection of
the file's "magic number")

2 years agonote metadata changes
Tony Cook [Mon, 5 Nov 2018 10:50:11 +0000 (21:50 +1100)]
note metadata changes

2 years agoadd changes since 1.006
Tony Cook [Sat, 3 Nov 2018 05:31:27 +0000 (16:31 +1100)]
add changes since 1.006

2 years agofix some old Changes typos
Tony Cook [Sat, 3 Nov 2018 05:31:12 +0000 (16:31 +1100)]
fix some old Changes typos

2 years agoadding missing 1.006 Changes header
Tony Cook [Sat, 3 Nov 2018 05:30:50 +0000 (16:30 +1100)]
adding missing 1.006 Changes header

2 years agofix error handling in i_polygon() for non-polygon polygons
Tony Cook [Sat, 3 Nov 2018 05:30:27 +0000 (16:30 +1100)]
fix error handling in i_polygon() for non-polygon polygons

2 years agoimprove all Makefile.PLs
Tony Cook [Sat, 3 Nov 2018 03:59:27 +0000 (14:59 +1100)]
improve all Makefile.PLs

2 years agoUpdate metadata to meta-spec 2, include web view of repository, correct EUMM version...
Dan Book [Wed, 26 Sep 2018 21:27:00 +0000 (17:27 -0400)]
Update metadata to meta-spec 2, include web view of repository, correct EUMM version checks

3 years agomake it clear that noalpha doesn't compose
Tony Cook [Fri, 7 Sep 2018 04:08:03 +0000 (14:08 +1000)]
make it clear that noalpha doesn't compose

3 years agofix a typo (after almost "braking" it a different way)
Tony Cook [Tue, 5 Jun 2018 00:00:23 +0000 (10:00 +1000)]
fix a typo (after almost "braking" it a different way)

yay homonyms