Commit Graph

5444 Commits

Author SHA1 Message Date
John Cupitt
00622428bd zero memory on malloc
to prevent write of uninit memory under some error conditions

thanks Balint
2019-01-18 10:10:43 +00:00
John Cupitt
63c6c7ae30 fix small magicksave error
copy-paste fail meant that IM exceptions were not inherited correctly

see 1619c8b1a1 (commitcomment-31838043)
2019-01-04 10:34:30 +00:00
John Cupitt
1619c8b1a1 fix memleak in magick6load
IM ExceptionInfo were not being freed correctly. This patch
adds a small wrapper function and uses it to allocate and free all IM
exception objects.

Tested with im 6.9 and gm 1.3.

See:

https://github.com/libvips/lua-vips/issues/24

https://github.com/libvips/libvips/issues/1203
2019-01-04 08:38:58 +00:00
John Cupitt
9d66420ad5 round to nearest in log scale
we were doing round to nearest in linear mode, but not log

see https://github.com/libvips/build-win64-mxe/issues/3
2018-12-29 20:19:38 +00:00
John Cupitt
6ba4b3bfdb fix clipping with new mapim cods
we had the clip in the wrong place

see https://github.com/libvips/libvips/issues/1180
2018-12-17 20:29:31 +00:00
John Cupitt
582b224125 oops revert version bump 2018-12-17 13:20:14 +00:00
John Cupitt
db4fe60405 fix mapim offsets
pixels were not being offset by the stencil origin, so interpolators
like bicubic could fail

thanks @erdmann

https://github.com/libvips/libvips/issues/1180
2018-12-17 12:42:34 +00:00
John Cupitt
0d5eced964 break on dpi too high as well 2018-12-07 13:09:22 +00:00
John Cupitt
da31d0f31a fix autofit loop on non-scaleable fonts
see https://github.com/libvips/libvips/issues/1178
2018-12-07 12:57:44 +00:00
John Cupitt
ac4897abee Fix up vips_text()
Fixes two issues:

1. vips_text() in autofit mode could set the wrong DPI, since it set the
DPI in its own copy of the variable, but did not do a final update on
the DPI setting that FT uses for rendering.

2. vips_text() in autofit mode allocated a new context each time, rather
than reusing the context for that call. This caused a small memory leak.

See https://github.com/libvips/libvips/issues/1174
2018-12-05 14:24:26 +00:00
John Cupitt
d4815e8b7e more info output for tmpfile open
to help diagnose problems
2018-11-21 14:26:52 +00:00
John Cupitt
0bea76d364 fix temp file open
was not auto-deleteing on windows, needs a fallback on linux

see https://github.com/libvips/libvips/pull/1155
2018-11-05 10:40:51 +00:00
John Cupitt
1b47c64c94
Merge pull request #1118 from jcupitt/test-for-g_str_to_ascii
fix build on older glibs
2018-10-01 21:22:33 +01:00
John Cupitt
0fea113bbf fix build on older glibs
we were using g_str_to_ascii(), but it was only added in glib 2.40

see https://github.com/libvips/libvips/issues/1117
2018-10-01 20:15:34 +01:00
John Cupitt
90b366db07 fix more doc links 2018-09-27 06:32:20 +01:00
John Cupitt
f3de6a9521 update function list in docs
thanks janko-m

see https://github.com/jcupitt/libvips/issues/1097
2018-09-20 08:26:51 +01:00
John Cupitt
5623bb1330 add a nifti wrapper for vips7
so nip2 can now load nifti images
2018-09-10 14:35:49 +01:00
John Cupitt
3f8c04c38b add docs for mosaic output
note the extra params that let you read out the transform
2018-09-05 09:02:39 +01:00
John Cupitt
f9cbc7263d
Merge pull request #1081 from lovell/composite-cpp-sentinel
Silence 'missing sentinel' warnings in GCC v6+
2018-09-04 11:06:16 +01:00
Lovell Fuller
ec2ad85279 Silence 'missing sentinel' warnings in GCC v6+ 2018-09-04 11:00:39 +01:00
John Cupitt
870610af4e reduce stack usage to help musl
don't allocate a pointer array on the stack in arithmetic.c

see f3ef6e52ea
2018-09-04 08:46:37 +01:00
John Cupitt
1702529be0 add a compat stub for vips_region_shrink()
to keep ABI compat with 8.6
2018-08-29 09:50:35 +01:00
John Cupitt
bb23a1fe6c fix openexr alpha test 2018-08-28 11:18:21 +01:00
John Cupitt
8891d6dc29 exif strings were not trimmed correctly
drop_tail() missed the final "()"
2018-08-28 11:08:49 +01:00
John Cupitt
f725d7efab
Merge pull request #1074 from lovell/vips_icc_is_compatible_profile-leak
Fix 72 byte leak when ICC profile is compatible
2018-08-23 22:17:02 +01:00
Lovell Fuller
814af7e832 Fix 72 byte leak when ICC profile is compatible 2018-08-23 22:04:28 +01:00
John Cupitt
fec2f5f869 make vips_object_get_args() return an int
since malloc can fail
2018-08-20 08:45:46 +01:00
John Cupitt
30cb95e6e7
Merge pull request #1068 from kleisauke/add-vips_object_get_args
Add vips_object_get_args
2018-08-20 08:24:31 +01:00
Kleis Auke Wolthuizen
b5b756b817 Add vips_object_get_args
Handy for language bindings.
2018-08-19 22:42:26 +02:00
John Cupitt
96770a49b1 add -lznz to the nifti test to help win
see https://github.com/jcupitt/libvips/pull/1066
2018-08-19 21:17:32 +01:00
John Cupitt
3d249924a5 another early close for openexr read 2018-08-19 19:30:11 +01:00
John Cupitt
f4250ab7ab scale openexr alpha up
scale alpha up to 0 - 255 to match the rest of libvips
2018-08-19 10:53:54 +01:00
John Cupitt
b92c55770f openexr shut down early
for non-tiled images anyway
2018-08-19 05:30:49 +01:00
John Cupitt
a0c8417109 Merge branch 'master' into close-input-early 2018-08-19 05:24:28 +01:00
John Cupitt
93e3ffb0bb note on tiled tiff read
I had a quick go at making tiffload shut down early for tiled tiff read,
but it's not really possible because tiled read is not guaranteed to be
ordered.

Add a note for future reference.
2018-08-19 05:19:11 +01:00
John Cupitt
fdafb4de5f oop fix tiff2vips change
y is relative
2018-08-19 04:26:24 +01:00
John Cupitt
79cafbd604 regen some docs 2018-08-17 18:04:47 +01:00
John Cupitt
cfeef85677 revise README for 8.7 2018-08-17 17:52:45 +01:00
John Cupitt
10d1aeb6f2 make pdf load close early
but only in seq mode
2018-08-17 11:14:06 +01:00
John Cupitt
0b4cef06b7 close early for tiffload 2018-08-16 16:00:14 +01:00
John Cupitt
b836749b75 close jpeg read early
The current behaviour (close input handles on unref) works for languages
like C / C++ / Python / Rust / etc. where things get unreffed automatically
when they go out of scope.

On languages like Ruby / C# / node / etc. where things are unreffed on GC,
files can stay open for a long time after you've finished with them. This
interacts in an unfortunate way with the Windows default of refusing to
remove open files.

This change closes file handles as soon as the scan of the input file
finishes, and therefore produces something closer to expected behaviour
for GCd languages on Windows.

see https://github.com/kleisauke/net-vips/issues/12
2018-08-16 15:47:48 +01:00
John Cupitt
f3ef6e52ea bump max input images for sum
was only 64
2018-08-16 15:23:24 +01:00
John Cupitt
d48f80130b switch to g_open()/g_fopen()
Might help with files being left open, perhaps. It's certainly neater.

See https://github.com/kleisauke/net-vips/issues/12
2018-08-15 14:58:12 +01:00
John Cupitt
68fd9c8de6
Merge pull request #1061 from criteo-forks/master
Fix missing area unref in getpoint()
2018-08-14 18:00:39 +01:00
Dimitri Bouron
1c1aeb2262
Merge pull request #1 from dbouron/master
Fix missing area unref in getpoint()
2018-08-14 14:32:59 +02:00
Dimitri Bouron
725d39e691 Fix missing area unref in getpoint()
Signed-off-by: Dimitri Bouron <d.bouron@criteo.com>
2018-08-14 14:19:01 +02:00
John Cupitt
01b66f5ccd clear gif pages before load
some gifs may not clear the background, so we must init pages as 0

see https://github.com/lovell/sharp/issues/1331
2018-08-13 17:30:54 +01:00
John Cupitt
9a5249ca20 tag unicode strings as unicode
seems to help with py2.7 anyway
2018-08-12 18:25:19 +01:00
John Cupitt
643e7c0ea2 mapim fix for strange float values
mapim could fail for float index images outside the int range

minor speedup too
2018-08-12 17:10:23 +01:00
John Cupitt
c1dcb0c535 Merge branch 'master' of github.com:jcupitt/libvips 2018-08-07 15:07:46 +01:00