imager.git
5 years agofix a context object reference leak from upgrading a paletted image
Tony Cook [Wed, 9 Mar 2016 10:05:50 +0000 (21:05 +1100)]
fix a context object reference leak from upgrading a paletted image

The internal process of upgrading a paletted image to a direct image,
done when a color not in the palette is written to the image, no
long leaks a reference count to the context object.

5 years agoclean up gif writing error handling (and fix a leak)
Tony Cook [Wed, 9 Mar 2016 10:03:52 +0000 (21:03 +1100)]
clean up gif writing error handling (and fix a leak)

doesn't fix a memory leak in giflib 4.x, which I can't do anything
about.

5 years agono longer deliberately leak the first context object
Tony Cook [Wed, 9 Mar 2016 10:02:15 +0000 (21:02 +1100)]
no longer deliberately leak the first context object

Previously Imager would deliberately leak the context object from
the start thread to ensure there was always at least one context
object available.

Modified the log code to handle there being no context object.

5 years agofix i_nearest_color() for threaded builds
Tony Cook [Wed, 9 Mar 2016 09:59:03 +0000 (20:59 +1100)]
fix i_nearest_color() for threaded builds

5 years agoupdate Changes some more
Tony Cook [Mon, 29 Feb 2016 11:19:06 +0000 (22:19 +1100)]
update Changes some more

5 years agoavoid uninitialized value warnings in the FT2 driver
Tony Cook [Tue, 23 Feb 2016 11:01:57 +0000 (22:01 +1100)]
avoid uninitialized value warnings in the FT2 driver

The values were only logged, but let's silence valgrind

5 years agomore nearest_color leaks
Tony Cook [Tue, 23 Feb 2016 11:00:46 +0000 (22:00 +1100)]
more nearest_color leaks

5 years agoset pixels with no coverage to all zero
Tony Cook [Tue, 23 Feb 2016 11:00:08 +0000 (22:00 +1100)]
set pixels with no coverage to all zero

valgrind complained about use of uninitialized values

5 years agofix documentation of i_gpix_d (internal)
Tony Cook [Tue, 23 Feb 2016 10:59:01 +0000 (21:59 +1100)]
fix documentation of i_gpix_d (internal)

5 years agoFT1 font driver: leaked buffer if it failed to open a font
Tony Cook [Tue, 23 Feb 2016 10:58:32 +0000 (21:58 +1100)]
FT1 font driver: leaked buffer if it failed to open a font

5 years agonearest_color filter: was leaking malloc()ed buffers
Tony Cook [Tue, 23 Feb 2016 10:57:54 +0000 (21:57 +1100)]
nearest_color filter: was leaking malloc()ed buffers

5 years agocombine() - was leaking malloc()ed row buffers
Tony Cook [Tue, 23 Feb 2016 10:57:21 +0000 (21:57 +1100)]
combine() - was leaking malloc()ed row buffers

5 years agogetcolorusage() leaked in i_get_anonymous_color_histo() on too many colors
Tony Cook [Sun, 21 Feb 2016 02:31:16 +0000 (13:31 +1100)]
getcolorusage() leaked in i_get_anonymous_color_histo() on too many colors

i_get_anonymous_color_histo() leaked the sample buffer.

5 years agogetcolorcount() leaked in i_count_colors() on too many colors
Tony Cook [Sun, 21 Feb 2016 02:29:18 +0000 (13:29 +1100)]
getcolorcount() leaked in i_count_colors() on too many colors

The sample array was leaked when the number of colors in the image
exceeded the supplied limit.

5 years agoremove a leak in make_palette()
Tony Cook [Sun, 21 Feb 2016 02:28:03 +0000 (13:28 +1100)]
remove a leak in make_palette()

The XS leaked the temp image array (not the images themselves) used
to pass the images to i_quant_makemap()

5 years agore-work malloc_temp(), calloc_temp() to avoid SV overhead
Tony Cook [Sun, 21 Feb 2016 01:17:05 +0000 (12:17 +1100)]
re-work malloc_temp(), calloc_temp() to avoid SV overhead

Previosly they created a temp SV and returned it's buffer.  Now they
just call Newx() or Newxz() and SAVEFREEPV() the result.

5 years agoupdate Changes
Tony Cook [Sun, 21 Feb 2016 01:08:41 +0000 (12:08 +1100)]
update Changes

5 years agoadd a missing attribution for #106836
Tony Cook [Sun, 21 Feb 2016 00:46:05 +0000 (11:46 +1100)]
add a missing attribution for #106836

5 years ago[rt #111871] re-work autolevels
Tony Cook [Sun, 21 Feb 2016 00:45:43 +0000 (11:45 +1100)]
[rt #111871] re-work autolevels

- avoid an off-by-one error when calculating the minimum and maximum
  levels from the histogram

- optimize 8-bit images by using a lookup table instead of doing
  a floating point multiply for each sample

5 years agoallow imcover to use a non-default perl
Tony Cook [Tue, 16 Feb 2016 09:30:35 +0000 (20:30 +1100)]
allow imcover to use a non-default perl

5 years agoimcover.perl: add an option to just regen coverage
Tony Cook [Sat, 13 Feb 2016 02:19:39 +0000 (13:19 +1100)]
imcover.perl: add an option to just regen coverage

5 years agofix Imager::Color->new(channels => []) with a short array
Tony Cook [Sat, 13 Feb 2016 02:07:42 +0000 (13:07 +1100)]
fix Imager::Color->new(channels => []) with a short array

Previously this would fail.

5 years agoavoid leaking memory in addcolors()
Tony Cook [Tue, 16 Feb 2016 09:30:14 +0000 (20:30 +1100)]
avoid leaking memory in addcolors()

5 years agofix scaling of samples for autolevels_mono
Tony Cook [Mon, 8 Feb 2016 08:29:04 +0000 (19:29 +1100)]
fix scaling of samples for autolevels_mono

5 years agowe no longer try to deal with buggy giflibs
Tony Cook [Tue, 26 Jan 2016 09:54:04 +0000 (20:54 +1100)]
we no longer try to deal with buggy giflibs

5 years agomodernize t/200-file/400-basic.t and handle fails correctly
Tony Cook [Tue, 26 Jan 2016 09:34:53 +0000 (20:34 +1100)]
modernize t/200-file/400-basic.t and handle fails correctly

Previously the custom ok() would mis-handle errors, because it called
methods in list context, which on failure could treat the note for the
test as the result and pass.

This typically resulted in crashes later in the code, see

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812093

for an example.

5 years ago1.004 release v1.004
Tony Cook [Sun, 8 Nov 2015 09:44:24 +0000 (20:44 +1100)]
1.004 release

5 years agonote that new() accepts an io parameter
Tony Cook [Sun, 8 Nov 2015 09:16:32 +0000 (20:16 +1100)]
note that new() accepts an io parameter

5 years agomore Changes
Tony Cook [Sun, 8 Nov 2015 00:16:58 +0000 (11:16 +1100)]
more Changes

5 years agoImager->new now attempts to read a file given any data source
Tony Cook [Sun, 8 Nov 2015 00:09:42 +0000 (11:09 +1100)]
Imager->new now attempts to read a file given any data source

Previously, attempting to read a raw image would simply return a blank
image, since the xsize and ysize parameters are required when reading
a raw image, and new() checked only those parameters to decide to
return a blank image.

5 years agoupdate Changes
Tony Cook [Wed, 4 Nov 2015 11:11:44 +0000 (22:11 +1100)]
update Changes

5 years agofix indentation
Tony Cook [Wed, 4 Nov 2015 11:06:13 +0000 (22:06 +1100)]
fix indentation

5 years agoRT #107900 Panic due to attempt to extend stack by negative amount
A. Sinan Unur [Wed, 21 Oct 2015 19:41:24 +0000 (15:41 -0400)]
RT #107900 Panic due to attempt to extend stack by negative amount

See https://rt.cpan.org/Public/Bug/Display.html?id=107900

See also

http://www.cpantesters.org/distro/I/Imager.html#Imager-1.003?grade=1&perlmat=3&patches=2&oncpan=2&distmat=2&perlver=5.23.4&osname=ALL&version=1.003

Fix by only EXTENDing return stack and pushing values if returned
col_cnt is positive.

5 years agoavoid a warning during testing on 5.22+
Tony Cook [Thu, 29 Oct 2015 23:33:54 +0000 (10:33 +1100)]
avoid a warning during testing on 5.22+

the code puts a file handle into an error state, which confuses the
new diagnostic that triggers when we fail to close a handle implicitly

5 years agoadd a test for the preload method
Tony Cook [Thu, 29 Oct 2015 23:32:49 +0000 (10:32 +1100)]
add a test for the preload method

5 years ago[rt #104896] add Imager::Color::Table to preload
Tony Cook [Thu, 29 Oct 2015 22:44:56 +0000 (09:44 +1100)]
[rt #104896] add Imager::Color::Table to preload

5 years agomark a url so none of it is spell checked
Tony Cook [Thu, 27 Aug 2015 12:27:20 +0000 (22:27 +1000)]
mark a url so none of it is spell checked

5 years agoupdate for a more current Pod::Spell, including a possible bug
Tony Cook [Thu, 27 Aug 2015 12:26:57 +0000 (22:26 +1000)]
update for a more current Pod::Spell, including a possible bug

6 years ago1.003 release v1.003
Tony Cook [Tue, 12 May 2015 08:09:17 +0000 (18:09 +1000)]
1.003 release

6 years agochanges updates
Tony Cook [Tue, 12 May 2015 08:03:32 +0000 (18:03 +1000)]
changes updates

6 years agomore flood_fill tests
Tony Cook [Sat, 9 May 2015 03:19:03 +0000 (13:19 +1000)]
more flood_fill tests

6 years agoadd a few extra flood fill tests
Tony Cook [Sun, 26 Apr 2015 03:42:25 +0000 (13:42 +1000)]
add a few extra flood fill tests

6 years ago[rt #103786] prevent fills crossing 4-connected boundaries
Tony Cook [Sun, 26 Apr 2015 03:38:21 +0000 (13:38 +1000)]
[rt #103786] prevent fills crossing 4-connected boundaries

fixed an off-by-one error inherited from the original pseudo-code

6 years ago1.002 release v1.002
Tony Cook [Fri, 3 Apr 2015 01:13:24 +0000 (12:13 +1100)]
1.002 release

6 years agowe don't need to bump API level twice in the same release
Tony Cook [Thu, 26 Mar 2015 06:03:17 +0000 (17:03 +1100)]
we don't need to bump API level twice in the same release

6 years agomore types documentation for the API
Tony Cook [Thu, 26 Mar 2015 06:01:08 +0000 (17:01 +1100)]
more types documentation for the API

6 years agochange note for colormodel() etc
Tony Cook [Thu, 26 Mar 2015 04:47:24 +0000 (15:47 +1100)]
change note for colormodel() etc

6 years agoadd colorchannels(), alphachannel() and colormodel() methods
Tony Cook [Thu, 26 Mar 2015 04:36:49 +0000 (15:36 +1100)]
add colorchannels(), alphachannel() and colormodel() methods

also add model parameter to Imager->new()

6 years agozero unfilled channels in color returned by getpixel()
Tony Cook [Fri, 30 Jan 2015 22:57:24 +0000 (09:57 +1100)]
zero unfilled channels in color returned by getpixel()

6 years agoupdate Changes with circles and polypolys
Tony Cook [Sun, 25 Jan 2015 09:56:10 +0000 (20:56 +1100)]
update Changes with circles and polypolys

6 years agoimproved polygon support
Tony Cook [Sun, 25 Jan 2015 09:51:46 +0000 (20:51 +1100)]
improved polygon support

6 years agopolygon documentation
Tony Cook [Sat, 6 Sep 2014 00:17:44 +0000 (10:17 +1000)]
polygon documentation

6 years agobump IMAGER_API_LEVEL since I added APIs
Tony Cook [Sat, 6 Sep 2014 00:17:23 +0000 (10:17 +1000)]
bump IMAGER_API_LEVEL since I added APIs

6 years agoaccess to poly_poly from perl as polypolygon()
Tony Cook [Wed, 23 Apr 2014 12:34:44 +0000 (22:34 +1000)]
access to poly_poly from perl as polypolygon()

6 years agodon't match against horizontal lines
Tony Cook [Mon, 27 Jan 2014 10:57:59 +0000 (21:57 +1100)]
don't match against horizontal lines

6 years agoC level support for filling multiple polygons in one call
Tony Cook [Fri, 24 Jan 2014 10:47:08 +0000 (21:47 +1100)]
C level support for filling multiple polygons in one call

6 years ago[perl #101682] define i_circle_aa_fill() and use it circle
Tony Cook [Sat, 24 Jan 2015 03:08:40 +0000 (14:08 +1100)]
[perl #101682] define i_circle_aa_fill() and use it

speeds up smaller circle fills considerably, larger circles are
dominated by fill time rather than calculation so lose out

6 years ago[perl #101682] speed up color filled circle calculations
Tony Cook [Fri, 23 Jan 2015 12:29:37 +0000 (23:29 +1100)]
[perl #101682] speed up color filled circle calculations

replaces a very inefficient mechanism calculating many sin()/cos() values
with a faster mechanism

It might be possible to replace this with a Bresenham's circle
algorithm, but one step at a time.

6 years ago1.001 release v1.001
Tony Cook [Thu, 1 Jan 2015 22:13:46 +0000 (09:13 +1100)]
1.001 release

6 years agomake sure the Mandelbrot and Flines filters are built
Tony Cook [Thu, 1 Jan 2015 22:49:49 +0000 (09:49 +1100)]
make sure the Mandelbrot and Flines filters are built

6 years agoDevel::CheckLib: handle the gcc-4 symlink on Cygwin
Tony Cook [Thu, 25 Dec 2014 05:38:00 +0000 (16:38 +1100)]
Devel::CheckLib: handle the gcc-4 symlink on Cygwin

6 years agoupdate Changes for the FT1 and --enable/disable fixes
Tony Cook [Sat, 6 Dec 2014 00:03:44 +0000 (11:03 +1100)]
update Changes for the FT1 and --enable/disable fixes

6 years agomake --enable and --disable work again
Tony Cook [Sat, 29 Nov 2014 05:32:42 +0000 (16:32 +1100)]
make --enable and --disable work again

6 years agoswitch FT1 probing to use Imager::Probe
Tony Cook [Sat, 29 Nov 2014 05:12:14 +0000 (16:12 +1100)]
switch FT1 probing to use Imager::Probe

and clean up some of the old cruft

6 years agonote probing verbosity in Changes
Tony Cook [Sat, 22 Nov 2014 03:07:45 +0000 (14:07 +1100)]
note probing verbosity in Changes

6 years agomore verbose probe output
Tony Cook [Sat, 22 Nov 2014 03:05:25 +0000 (14:05 +1100)]
more verbose probe output

6 years agoChanges updates
Tony Cook [Sat, 22 Nov 2014 02:08:55 +0000 (13:08 +1100)]
Changes updates

6 years agoGIF: avoid leaving trash behind when the 4.2.0 version bug fails
Tony Cook [Sat, 22 Nov 2014 02:01:06 +0000 (02:01 +0000)]
GIF: avoid leaving trash behind when the 4.2.0 version bug fails

6 years ago[rt #99959] fix Imager::Matrix2d::rotate()'s centre point hanling
Tony Cook [Sat, 15 Nov 2014 02:47:48 +0000 (13:47 +1100)]
[rt #99959] fix Imager::Matrix2d::rotate()'s centre point hanling

also add a compose() method and add notes on the order of multiplcation
vs composition of transformations.

6 years ago[RT #99507] don't apply the icon mask to images with an alpha channel
Tony Cook [Sat, 8 Nov 2014 02:41:29 +0000 (13:41 +1100)]
[RT #99507] don't apply the icon mask to images with an alpha channel

but do it if the caller asks nicely

7 years agoChange note for strerror() fix
Tony Cook [Mon, 25 Aug 2014 05:17:41 +0000 (15:17 +1000)]
Change note for strerror() fix

7 years agomy_strerror is defined since perl 5.21.x
Slaven Rezic [Thu, 21 Aug 2014 18:15:38 +0000 (20:15 +0200)]
my_strerror is defined since perl 5.21.x

This change fixes https://rt.cpan.org/Ticket/Display.html?id=98234

7 years agoImager 1.000 release v1.000
Tony Cook [Tue, 29 Jul 2014 09:08:56 +0000 (19:08 +1000)]
Imager 1.000 release

7 years agonote the iolayer test changes
Tony Cook [Mon, 28 Jul 2014 11:17:15 +0000 (21:17 +1000)]
note the iolayer test changes

7 years agoimprove error reporting for an iolayer test failing on some smokers
Tony Cook [Mon, 28 Jul 2014 11:12:08 +0000 (21:12 +1000)]
improve error reporting for an iolayer test failing on some smokers

7 years agofix the skip check for using qr// objects as a buffer
Tony Cook [Mon, 28 Jul 2014 11:11:39 +0000 (21:11 +1000)]
fix the skip check for using qr// objects as a buffer

previously it always skipped

7 years ago0.99_02 release v0.99_02
Tony Cook [Mon, 21 Jul 2014 09:11:36 +0000 (19:11 +1000)]
0.99_02 release

7 years agochange note for MAXINT removal
Tony Cook [Mon, 21 Jul 2014 09:00:38 +0000 (19:00 +1000)]
change note for MAXINT removal

7 years agoeliminate Imager's internal MAXINT macro
Tony Cook [Mon, 21 Jul 2014 06:14:28 +0000 (16:14 +1000)]
eliminate Imager's internal MAXINT macro

This conflicted with MAXINT in the win32 headers

7 years agoupdate Changes for the Inline fix
Tony Cook [Wed, 16 Jul 2014 11:46:17 +0000 (21:46 +1000)]
update Changes for the Inline fix

7 years ago[rt #97108] support Inline 0.57 and later
Tony Cook [Wed, 16 Jul 2014 11:45:08 +0000 (21:45 +1000)]
[rt #97108] support Inline 0.57 and later

Inline 0.57 changed the "with" interface

7 years agoupdate Changes
Tony Cook [Tue, 15 Jul 2014 12:55:54 +0000 (22:55 +1000)]
update Changes

7 years ago[rt #97086] initialize the blue entry in each palette entry
Tony Cook [Tue, 15 Jul 2014 12:50:52 +0000 (22:50 +1000)]
[rt #97086] initialize the blue entry in each palette entry

and fill up to the top of the range in luminosity

7 years agorevert 3e00cb90493 and update ppport.h
Tony Cook [Mon, 14 Jul 2014 12:05:12 +0000 (22:05 +1000)]
revert 3e00cb90493 and update ppport.h

This failed to build on 5.6.2 and didn't provide a huge performance
improvement.

7 years agoImager 0.99_01 test release v0.99_01
Tony Cook [Sun, 29 Jun 2014 04:33:28 +0000 (14:33 +1000)]
Imager 0.99_01 test release

7 years agonote what release broke older perls
Tony Cook [Sun, 29 Jun 2014 04:29:13 +0000 (14:29 +1000)]
note what release broke older perls

7 years agoskip the unnecessary palette benign error before 1.6
Tony Cook [Fri, 27 Jun 2014 11:29:40 +0000 (21:29 +1000)]
skip the unnecessary palette benign error before 1.6

since libpng didn't report it then

7 years agofix SV type probing to not break pre perl 5.12
Tony Cook [Fri, 27 Jun 2014 10:11:57 +0000 (20:11 +1000)]
fix SV type probing to not break pre perl 5.12

7 years agoadd support for giflib 5.1.0
Tony Cook [Fri, 27 Jun 2014 08:27:22 +0000 (18:27 +1000)]
add support for giflib 5.1.0

7 years agoImager 0.99 release v0.99
Tony Cook [Wed, 25 Jun 2014 11:33:37 +0000 (21:33 +1000)]
Imager 0.99 release

7 years agosacrifice a chicken to the spell-checker gods
Tony Cook [Wed, 25 Jun 2014 11:31:27 +0000 (21:31 +1000)]
sacrifice a chicken to the spell-checker gods

7 years agoactually document the change in read buffer values
Tony Cook [Wed, 25 Jun 2014 11:26:54 +0000 (21:26 +1000)]
actually document the change in read buffer values

7 years agoreplace SV_COW_DROP_PV with an actual value
Tony Cook [Sat, 14 Jun 2014 01:10:57 +0000 (11:10 +1000)]
replace SV_COW_DROP_PV with an actual value

7 years agoensure we always produce the same Imager::Regops
Tony Cook [Sat, 14 Jun 2014 01:09:17 +0000 (11:09 +1000)]
ensure we always produce the same Imager::Regops

On win32 this produced a CRLF file which confused git

7 years agodon't confuse git over directory name vs branch name
Tony Cook [Sat, 14 Jun 2014 01:08:22 +0000 (11:08 +1000)]
don't confuse git over directory name vs branch name

7 years agoChanges notes for 4593278bee25
Tony Cook [Fri, 13 Jun 2014 10:59:56 +0000 (20:59 +1000)]
Changes notes for 4593278bee25

7 years agoRT #94717 libpng 1.6.10 no longer considers CRC errors benign
Tony Cook [Fri, 13 Jun 2014 10:51:05 +0000 (20:51 +1000)]
RT #94717 libpng 1.6.10 no longer considers CRC errors benign

use a different badness for checking benign error support

7 years agochanges entry for autolevels fix
Tony Cook [Sat, 12 Apr 2014 03:13:08 +0000 (13:13 +1000)]
changes entry for autolevels fix

7 years agort #94413: autolevels no longer color-skews
Tony Cook [Sat, 12 Apr 2014 03:11:27 +0000 (13:11 +1000)]
rt #94413: autolevels no longer color-skews

The old autolevels filter has been renamed to "autolevels_skew", and
autolevels is now a filter that does histogram equalization over the
luminosity of the image, instead of per channel

7 years agoalso replace IM_PSAMP() in Imager::Preprocessor
Tony Cook [Sat, 5 Apr 2014 11:21:47 +0000 (22:21 +1100)]
also replace IM_PSAMP() in Imager::Preprocessor