Commit Graph

43 Commits

Author SHA1 Message Date
John Cupitt e2c2866fc6 tweak docs, add changelog notes
and an assert for semaphore_down_timeout

see https://github.com/libvips/libvips/pull/3253
2023-01-03 12:09:24 +00:00
Kleis Auke Wolthuizen 848a119faa
threadset: stop idle threads after a regular timeout (#3253)
* 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
2023-01-03 12:00:35 +00:00
Kleis Auke Wolthuizen 0337c09700
Cleanup gettext handling (#2695)
Use GLib's i18n support instead of copying and pasting that
logic into its own header. This deprecates the vips/intl.h
header in favour of glib/gi18n.h.
2022-02-27 15:27:28 +00:00
Kleis Auke Wolthuizen 9246094033 Fix function pointer cast issues
It is undefined behavior in C and C++ to cast a function pointer
to another type and call it that way. This does work in most native
platforms, however, despite it being UB, but in WASM it can fail.

See:
https://emscripten.org/docs/porting/guidelines/function_pointer_issues.html
2020-06-30 13:35:41 +02:00
John Cupitt 981d5c4b16 revise autorot system
- deprecate vips_autorot_get_angle() since orientation is no longer a
simple rotate
- add vips_image_get_orientation() and vips_image_get_orientation_swap()
- revise tiff and jpeg loader autorotate to just call vips_autorot(),
but only if necessary
- revise thumbnail autorotate too
2020-06-06 17:25:46 +01:00
John Cupitt b085908558 remove vips7 stuff from API
You must now include vips7 support explicitly with

	#include <vips/vips7compat.h>

in your code just after including `vips.h`.

The old vips7 names, such as `Rect`, were starting to cause problems
with other packages like opencv.
2018-05-16 15:08:21 +01:00
John Cupitt 07e6ac1994 support --vips-info
now turns on glib g_info() output
2017-01-04 07:23:50 +00:00
John Cupitt 2be0b97dce switch to g_warning()_/g_info()
we had vips_warn() and vips_info(), but they are a bit crappy ... switch
to g_warning() and g_info() instead

see https://github.com/jcupitt/libvips/issues/544
2017-01-03 15:52:27 +00:00
John Cupitt 29d073c04c now compiles cleanly with -Wstrict-prototypes
some downstream packages were seeing lots of spurious warnings
2015-01-21 09:02:56 +00:00
John Cupitt 32a8fe117e start working on --disable-deprecated
need to move im_conv() etc to classes to finish this
2014-07-25 18:06:52 +01:00
Benjamin Gilbert 8cc76a6ba3 Update address for Free Software Foundation
Also update LGPLv2.1 license text from the copy currently on the GNU
website.
2013-03-07 00:40:19 -05:00
John Cupitt 7130a74d0e redo rad2float / float2rad as classes 2012-09-20 15:13:44 +01:00
John Cupitt a38fa9302e redo im_Lab2XYZ() as a class 2012-09-18 14:14:08 +01:00
John Cupitt 88c3f7ab7d fix compiler warnings
some compiler warnings appeared in a production build (assert()s
commented out, -Wall, and -O2)

thanks to Dmitry Roshchin for the report
2012-08-14 12:43:54 +01:00
John Cupitt ae8faf6597 remove dmalloc support
we never used it and valgrind etc. is better anyway
2011-09-23 17:12:47 +01:00
John Cupitt 2909cb93a4 add a 'stop' param to generate
generate now has a 'stop' param, set this to indicate early successful
termination

this will be used by VipsMin and friends to stop scanning early for
conditions like seen a 0 in a uchar image while searching for min
2011-08-29 14:29:33 +01:00
John Cupitt 56840af97d fix im_cache
im_cache updated
2011-03-25 12:52:48 +00:00
John Cupitt bb813a21b5 libvips builds
clean build, phew, try tools next
2011-03-04 16:14:13 +00:00
John Cupitt cbc366cd7d more image to object hackery
More movement of VipsImage to a subclass of VipsObject. im_close.c still
to do. Added wrappings for the enums.
2011-02-14 18:23:01 +00:00
John Cupitt 4915fb0a83 flood -> draw_flood 2010-10-01 10:47:48 +00:00
John Cupitt 6bcf09c1d4 smudge / smear stuff 2010-09-30 13:36:21 +00:00
John Cupitt 64f7f58411 stuff 2010-09-30 08:14:39 +00:00
John Cupitt 94763652ad added im_draw_point() / im_read_point() 2010-09-29 13:45:09 +00:00
John Cupitt 6b1c5b8e56 im_draw_mask() added 2010-09-28 16:06:58 +00:00
John Cupitt aad2eb8703 line drawing 2010-09-27 17:14:22 +00:00
John Cupitt 9330273f51 stuff 2010-09-26 15:33:58 +00:00
John Cupitt 3cae292f4f stuff 2010-09-22 22:02:44 +00:00
John Cupitt 39a6a2c0b3 added im_draw_rect(), deprecated im_paintrect() 2010-09-22 14:51:36 +00:00
John Cupitt de026e0750 deprecate _copy() inplace ops 2010-09-22 12:51:52 +00:00
John Cupitt f5faed779c stuff 2010-08-21 11:34:34 +00:00
John Cupitt fdbdba432b strip out threadgroup 2010-04-16 21:21:15 +00:00
John Cupitt 31a8830f46 stuff 2010-02-11 12:23:15 +00:00
John Cupitt 14516e72d3 conversion gtkdocs 2010-01-28 16:05:57 +00:00
John Cupitt 0be02902cb gtkdoc hacking 2010-01-27 16:35:36 +00:00
John Cupitt 79c050c814 added vips_bandfmt_*() 2010-01-26 21:28:33 +00:00
John Cupitt 66cd7511f4 goffice 0.7.15 fix 2009-11-15 14:01:37 +00:00
John Cupitt 73fba1c2ea rename convf to conv_f to help overloading 2009-11-13 12:01:36 +00:00
John Cupitt be6306172c stuff 2009-11-05 13:35:21 +00:00
John Cupitt 83fc4b907b finished colour 2009-11-02 17:54:42 +00:00
John Cupitt f9adf20874 gtkdoc comments for check 2009-10-12 15:27:18 +00:00
John Cupitt 3fdee44694 stuff 2009-10-03 14:15:24 +00:00
John Cupitt 70ae9f7751 move affine/similarity to deprecated 2009-09-21 16:19:23 +00:00
John Cupitt b628642f4a fix im_errormsg() calls 2009-09-21 15:50:29 +00:00