Commit Graph

7572 Commits

Author SHA1 Message Date
John Cupitt
60bae63644 updale libnsgif from upstream
seems slightly slower overall
2021-10-07 10:48:12 +01:00
John Cupitt
1192d87acf remove old libtiff numeric defines
use the glib ones instead rather than depending on stdint etc.
2021-10-01 17:29:43 +01:00
John Cupitt
33cca3ecbc fix jxload restart
if the loader was restarted (eg by vipsdisp) it could fail to fetch pixels
2021-10-01 12:36:02 +01:00
John Cupitt
6a53ab47e1 allow container jxl as well
We were not testing the jxl signature for the two types of jxl.

see https://github.com/jcupitt/vipsdisp/issues/5

thanks Fraetor
2021-10-01 06:53:37 +01:00
John Cupitt
08742ec304 fix tiff load of tiled packed formats
we were not checking if formats needed repacking for tiled load
2021-09-30 09:48:25 +01:00
John Cupitt
6e9a23524f add an error message for --with-magickpackage
it was causing some cufusion, see eg. https://github.com/libvips/libvips/discussions/2449
2021-09-29 18:17:48 +01:00
John Cupitt
5397fe5a4f note tiff change in changelog 2021-09-29 17:49:26 +01:00
John Cupitt
be0b0d17b8 better tiff write looping
We were looping over pages, cropping each one out, and saving.

Now there's a single loop for thw whole of the image, so things like
percent reporting work in the obvious way.

See https://github.com/libvips/libvips/issues/2450
2021-09-29 17:45:58 +01:00
John Cupitt
2501a62fd4 make doxygen default to off
with --enable-doxygen to enable it if you need it, same as gtk-doc
2021-09-24 12:14:13 +01:00
John Cupitt
1584d0d917 fix comment typo 2021-09-18 14:40:59 +01:00
John Cupitt
6acc77505b fix doc link 2021-09-18 14:18:43 +01:00
John Cupitt
024244bfbc don't free global_lcol on shutdown
since we need to be able to call things like error_buf after shutdown in
leak testing
2021-09-18 14:04:05 +01:00
John Cupitt
b96ed28903 update docs for vips_shutdown() use
Since we have a new policy.
2021-09-17 19:09:07 +01:00
John Cupitt
af61d375bc
experiment with removing shutdown from atexit (#2439)
remove shutdown from atexit

Because atexit() can be called at almost any point during process termination,
including after worker threads have been force-quit, we can't use it for
cleanup.

New policy: use vips_shutdown() explicitly if you need to clean up,
though it's optional. Only use atexit() for leak checking.
2021-09-17 19:02:53 +01:00
John Cupitt
b221830b5a better memory debug output 2021-09-16 15:46:35 +01:00
John Cupitt
1caad7f228 Merge branch '8.11' 2021-09-13 15:00:21 +01:00
John Cupitt
15416c410d raise the PNG text chunk limit
Raise the PNG text chunk limit to 50, since it seems some real images
have a text chunk per line of exif data.

See https://github.com/libvips/libvips/issues/2433
2021-09-13 14:40:20 +01:00
John Cupitt
d0d78f4670 Merge branch 'master' of github.com:libvips/libvips 2021-09-13 11:24:20 +01:00
John Cupitt
7e8af07c66
Fix flatten clip (#2432)
* fic gtk-doc typenames in cgif

* fix flatten clipping

flatten could produce out of range values if max_alpha was less than
the limit of the numeric range of the format

https://github.com/libvips/libvips/issues/2431
2021-09-13 11:23:02 +01:00
John Cupitt
7c0ec04b71 fic gtk-doc typenames in cgif 2021-09-12 16:03:32 +01:00
Kleis Auke Wolthuizen
5ab66e16e1
Fix UBSan errors (#1948)
* Ensure UBSan exits with a non-zero code on error

* Avoid misaligned member access in mosaic_fuzzer

* Add missing VIPS_CLIP in scRGB2sRGB/scRGB2BW

* Fix UBSan error in flatten

By using saturated casts for the int types (copied from vips_cast).

* CI: ensure fuzzer log is printed on error

* Avoid UB in heifload

* Revert flatten change

I could no longer reproduce this with clang 12 locally.

* Indentation fixes [skip ci]
2021-09-12 13:14:24 +01:00
Lovell Fuller
f7619cf33e
gifsave: expose bitdepth property (#2429)
Provides control over the maximum number of colours in the output
image palette, making the API more closely match that of pngsave.

Lowering the bitdepth to 7 (from the default value of 8), which
halves the maximum number of colours from 255 to 127, typically
reduces encoding time by ~20%.
2021-09-10 08:57:12 +01:00
John Cupitt
cfd9dc3f01 try to handle mmap failing in source
Some filesystems have mmap disabled. Make vips_source_map() fall back to
read if mmap fails.

See https://github.com/libvips/libvips/discussions/2415
2021-09-08 09:24:36 +01:00
John Cupitt
f2dd4471eb tiny code format changes 2021-09-07 13:54:59 +01:00
Lovell Fuller
e16cb5bfe5
quantise: optional thresholding of alpha channel (#2425)
Moving this logic from gifsave to quantise improves
the performance of writing RGBA GIFs by ~15%
2021-09-07 12:23:42 +01:00
Kleis Auke Wolthuizen
f2e5b7e9da
CI: resolve failures and various improvements (#2426)
* Simplify CI workflow

* CI: upgrade Ubuntu's Clang version to 12

* CI: upgrade macOS runner to version 11 (Big Sur)

* CI: temporarily disable the M1 runner

* CI: output test suite log upon failure

* CI: avoid brew update/upgrade steps

Since it may take a long time.

* CI: all jobs are supposed to succeed

* Fix test_descriptors.c failure after f8c2a36

Use a RANDOM image to create many crops from one source.
2021-09-07 11:14:45 +01:00
John Cupitt
f8c2a36746 arrayjoin signalling minimise also frees memory
By making the sequential line cache non-persistent, and only minimising
when the read point is well past the image.

On large arrayjoin operations, this saves many GB of memory.

See https://github.com/kleisauke/net-vips/issues/135
2021-09-06 23:14:36 +01:00
John Cupitt
579bdff012 more debug in source.c 2021-09-06 20:26:43 +01:00
John Cupitt
a20cd4cdc1 minimise arrayjoin inputs during processing
arrayjoin with a sequential pipeline will now minimise inputs when they
are no longer being used. This drops the number of open file handles
needed to construct large arrays.

Sadly, memory savings are minimal.

see https://github.com/kleisauke/net-vips/issues/135
2021-09-06 20:22:29 +01:00
John Cupitt
99724e6097 safer stop-early logic in tilecache
Don't actually stop the tilecache loop early, since that could deadlock,
instead just stop fetching from the pipeline.

see https://github.com/libvips/libvips/pull/2424
2021-09-05 12:55:52 +01:00
John Cupitt
e7889ff8e1 stop cache tile generation early on error
We didn't stop tile calculation as early as we could on error.

See https://github.com/libvips/libvips/pull/2424
2021-09-05 12:46:11 +01:00
Lovell Fuller
affc2400ed
heifload: switch demand to thinstrip (#2424)
Ensures decoding errors halt processing
2021-09-05 12:42:55 +01:00
John Cupitt
d5b40793b0 Merge branch '8.11' 2021-09-05 12:02:14 +01:00
John Cupitt
c5a6331d5e note thumbnail fix in changelog 2021-09-05 12:01:51 +01:00
John Cupitt
6f9d3ecf91 Merge branch '8.11' 2021-09-05 12:00:20 +01:00
Kleis Auke Wolthuizen
632badabe1
Ensure vips_thumbnail doesn't send an axis to 0 (#2416) 2021-09-05 11:58:44 +01:00
Lovell Fuller
4d079f1691
gifsave: use cgif namespaced API (#2422)
See https://github.com/dloebl/cgif/pull/18
2021-09-03 12:04:28 +01:00
John Cupitt
307d24eea7 Merge branch '8.11' 2021-08-30 14:02:28 +01:00
John Cupitt
b62287a792 check .v enums more carefully 2021-08-30 14:02:03 +01:00
John Cupitt
26f5da19e9 Merge branch '8.11' 2021-08-30 12:44:06 +01:00
John Cupitt
6444bfb5bb note coding fix in changelog 2021-08-30 12:43:43 +01:00
Lovell Fuller
bd8093ab71 Handle error values when guessing interpretation (#2421) 2021-08-30 12:30:55 +01:00
Lovell Fuller
4aaed60573 Ensure VIPS_CODING_ERROR is handled for vips images (#2420) 2021-08-30 12:30:43 +01:00
Lovell Fuller
01c39d0774
Ensure VIPS_CODING_ERROR is handled for vips images (#2420) 2021-08-29 20:16:31 +01:00
Lovell Fuller
30897e8e36
Handle error values when guessing interpretation (#2421) 2021-08-29 20:15:24 +01:00
John Cupitt
b9230edcbe Merge branch '8.11' 2021-08-29 19:13:12 +01:00
John Cupitt
451cfcd282 small cleanups from "unlimited" option 2021-08-29 19:08:51 +01:00
Joshua Sager
bb88490a17 Introduce unlimited flag, enabling unlimited text chunks in PNGs (#2419)
* Introduce unlimited flag, enabling unlimited text chunks

* remove extraneous optional flag causing GLib-GObject-CRITICAL **: 17:10:34.095: validate_and_install_class_property

* Address feedback from @jcupitt

* various compilation error fixes

* Interlace detection uses unlimited=false

* attempt to fix tests

* documentation changes, introduced MAX_PNG_TEXT_CHUNKS and bumped max to 20 (was 10)
2021-08-29 18:41:49 +01:00
Joshua Sager
608a7cee9b
Introduce unlimited flag, enabling unlimited text chunks in PNGs (#2419)
* Introduce unlimited flag, enabling unlimited text chunks

* remove extraneous optional flag causing GLib-GObject-CRITICAL **: 17:10:34.095: validate_and_install_class_property

* Address feedback from @jcupitt

* various compilation error fixes

* Interlace detection uses unlimited=false

* attempt to fix tests

* documentation changes, introduced MAX_PNG_TEXT_CHUNKS and bumped max to 20 (was 10)
2021-08-29 18:06:33 +01:00
John Cupitt
b0b8e6ee65 small style changes 2021-08-23 01:14:37 +01:00