* Add `vips_semaphore_down_timeout` to public API
In preparation for the next commit.
* threadset: stop idle threads after a regular timeout
In line with the previous behaviour of GLib's threadpool.
* threadset: fix a small memory leak
* threadset: ensure idle threads are freed on exit
GLib threads are spawned with `ref_count == 2`, this reference is
decreased during thread exit and associated resources are freed
during `g_thread_join()`. However, idle threads that are stopped
after a regular timeout are not joined. To fix this, decrease the
reference count during `vips_threadset_add()` and increase it just
before joining the thread with `g_thread_join()`.
See:
2d5d990c6a/glib/gthread.c (L522)2d5d990c6a/glib/gthread-posix.c (L1287)
* Deprecate `vips_g_thread_join()` in favor of `g_thread_join()`
* nit: remove extra semicolon
arrayjoin was making a region on every input image during startup, and
repeating for each thread (!!) so large arrays could be very expensive
to join.
Instead, make input regions on demand, and computre set of required
input images rather than searching for them.
See https://github.com/libvips/libvips/discussions/3247
In 8.13 we deprecated target_finish() (it did not have an error return)
to target_end() (now has an error return).
This PR makes target_end() also emit the "finish" signal for
compatibility with the previous API. ruby-vips, for example, looks for
on_finish() to close files.
See https://github.com/libvips/ruby-vips/issues/351
Thanks lucaskanashiro
* heifsave: make it possible to use a specific encoder
* argument label: switch to leading capital letter
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
* add VipsForeignHeifEncoder enum
* correct type
* implement reviewer feedback
Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
* doc: avoid use of GCC's old syntax (`-Wgnu-designator`)
* doc: highlight shell commands
* doc: point the C++ docs to v8.12
* doc: avoid highlight on output matching bash keywords
* ADded optional output parameter to smartcrop to track the center of
attention.
* Added unit test.
* Added docs & updated changelog.
* Updated argument labels & types in documentation.