Commit Graph

7500 Commits

Author SHA1 Message Date
John Cupitt
257e01ecef
Merge pull request #2256 from kleisauke/libjxl-module-fix
Only build libjxl as a loadable module when it can be found
2021-05-17 10:58:33 +01:00
Kleis Auke Wolthuizen
1562ba695a Ensure compatibility with Cygwin
G_PLATFORM_WIN32 is no longer defined for Cygwin.
2021-05-17 11:54:46 +02:00
Kleis Auke Wolthuizen
169c5e07eb Only build libjxl as a loadable module when it can be found 2021-05-17 11:34:44 +02:00
John Cupitt
def025da3e reorganise loadable modules
- heifload operation now defined in heifload.c, etc.
- C API wrappers moved to foreign.c
2021-05-17 09:45:27 +01:00
John Cupitt
f637206e8d move vips_threadpool_push to internal API
and rename as vips__thread_execute()
2021-05-17 08:42:39 +01:00
John Cupitt
77ab3d2562 fix build with non-standard libheif location 2021-05-16 20:44:50 +01:00
John Cupitt
dac75219b2 fix warning on 32-bit platforms 2021-05-16 17:47:04 +01:00
John Cupitt
e52a0d3912 more libjxl dbg output 2021-05-15 13:37:19 +01:00
John Cupitt
9f01132466
Merge pull request #2251 from kleisauke/cpp-function-list-3
Update C++ binding and function list
2021-05-12 11:28:38 +01:00
Kleis Auke Wolthuizen
b78812f200 Update C++ binding and function list 2021-05-12 11:36:24 +02:00
John Cupitt
d577b18e69 oop, dropped a comment 2021-05-11 18:10:54 +01:00
John Cupitt
eef3f9568d revise threadpool comments and docs 2021-05-11 10:23:05 +01:00
John Cupitt
e00ca4e6b7 make jxlload/save a loadable module 2021-05-10 16:45:28 +01:00
John Cupitt
53255419d7 fix "make check" on raspbian
unset LC_ALL in test/, thanks ewelot
2021-05-09 15:49:44 +01:00
John Cupitt
7391418d09 revise comment 2021-05-08 20:15:10 +01:00
John Cupitt
6d9308d93c fix a couple of compiler warnings 2021-05-08 19:51:01 +01:00
John Cupitt
a0e0c4e45b note new threading model in changelog 2021-05-08 18:58:54 +01:00
John Cupitt
98946e5e15
Merge pull request #2235 from kleisauke/reuse-threads
Reuse threads by using the thread pool of GLib (#2038)
2021-05-08 18:52:04 +01:00
John Cupitt
0d7dd3be7c limit jxlload image size
We were not checking the reported image size against VIPS_MAX_COORD,
leading to some glib out-of-range errors downstream.
2021-05-08 15:25:53 +01:00
John Cupitt
37988cef83 stop jxl header decode earlier
Previously, jxl header decode waited for JXL_DEC_NEED_IMAGE_OUT_BUFFER status.
But libjxl will actually allocate a lot of memory for decode before this
point, and this exposes jxlload to memory bombs.

This patch stops after JXL_DEC_COLOR_ENCODING, ie. just after the last
section before pixel data. This lets us get all image metadata, but
does no pixel buffer allocation.
2021-05-08 14:39:34 +01:00
John Cupitt
41cff4e9d0 Merge branch 'master' of github.com:libvips/libvips 2021-05-05 17:32:36 +01:00
John Cupitt
a2e5717e82 Merge branch '8.10' 2021-05-05 17:32:25 +01:00
John Cupitt
e19acd5148 fix load of large PPM images from a pipe
large PPM images loaded over pipes could cause a crash, thanks ewelot

see https://github.com/libvips/libvips/issues/2240
2021-05-05 17:29:50 +01:00
John Cupitt
3d142f87b6
Merge pull request #2239 from akash-akya/update-doc
Minor doc correction
2021-05-05 15:37:20 +01:00
akash-akya
e39142bab2 Update doc for vips_image_get_string 2021-05-05 18:23:11 +05:30
John Cupitt
0e861d7325 improve jxl eof detection
... again
2021-05-05 12:00:21 +01:00
John Cupitt
e480cfbe97 jxlload was not detecting EOF correctly
it could loop in some circumstances
2021-05-05 11:47:04 +01:00
John Cupitt
b87f5ba615 add a missing rewind to jxlload 2021-05-04 19:06:22 +01:00
John Cupitt
50c96a1e3b update doxyfile for new version 2021-05-03 15:13:41 +01:00
Kleis Auke Wolthuizen
83575e347a Use gatomicrefcount in sinkscreen 2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
060ab7c7a2 Free the calculated pixel buffer cache early
Since threads can be reused, we need to free the
calculated pixel buffer cache early (i.e. during
vips_thread_shutdown).

This (partially) reverts commit 1a915db.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
91a143e5c9 Swap g_private_set with g_private_replace where possible
There's a possibility that the old GDestroyNotify
handler is not called when threads are being reused.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
8b01104c67 Add suppressions file for ThreadSanitizer 2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
d1b4d12388 Move sink_disc and sink_screen threads to threadpool
And deprecate the vips_g_thread_new and vips_g_thread_join
functions.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
4144049174 Remove mutex lock for VipsThreadStartFn
vips_{avg,deviate,hough,max,min,stats} are the only arithmetic functions
that do not require a mutex on the _start and/or _stop function. All
other arithmetic functions still needs this, so move it to sink instead.
2021-05-03 13:21:45 +02:00
Kleis Auke Wolthuizen
80e0cc3d12 Reuse threads by using GLib's threadpool 2021-05-03 13:21:45 +02:00
John Cupitt
1423c550cc
Merge pull request #2234 from kleisauke/fix-ci-failures
Fix CI failures
2021-05-03 12:19:21 +01:00
Kleis Auke Wolthuizen
25a268c341 Fix CI failures
- Include the rgba image in the teardown of TestForeign.
- Fix merge conflict.
2021-05-03 12:39:40 +02:00
John Cupitt
70d76117bd Merge branch 'master' of github.com:libvips/libvips 2021-05-02 18:47:02 +01:00
John Cupitt
0eda488c60 make the tiff test less sensitive to rounding 2021-05-01 23:26:28 +01:00
John Cupitt
03f76b73b4 add "premultiply" param to tiffsave
Some programs, like indesign, only work with premultiplied alpha in TIFF. To
make TIFFs which are compatible with these programs, we'll need an extra
TIFF save flag (perhaps premultiply?) to premultiply alpha and save as
EXTRASAMPLE_ASSOCALPHA.

see https://github.com/libvips/libvips/issues/2192
2021-05-01 20:08:06 +01:00
John Cupitt
33812d79ad Merge branch 'master' of github.com:libvips/libvips 2021-05-01 14:48:25 +01:00
John Cupitt
5d9b60bcd5 revise heifsave docs 2021-05-01 14:48:06 +01:00
John Cupitt
1afde8b4fa allow speed 9 for heifsave
since aom now allows speed 9

see https://github.com/strukturag/libheif/pull/451

and https://github.com/libvips/libvips/issues/2180
2021-05-01 14:43:23 +01:00
John Cupitt
422f518e08
Merge pull request #2224 from libvips/add-jp2k-in-tiff
rebase add-jp2ktiff on master
2021-04-30 17:55:45 +01:00
John Cupitt
6198fb2d0d fix build on windows
only include source files in make dist for libnsgif and module/

we were just including the whole directory, which stopped the derived
files (eg. the .la archives) from being rebuilt on other platforms
2021-04-30 17:27:15 +01:00
John Cupitt
bd8f2de6fd fix libnsgif build
"make dist" was picking up .o files in libnsgif/
2021-04-30 14:28:29 +01:00
John Cupitt
6d562862aa revise jp2k compression profile 2021-04-30 12:24:26 +01:00
John Cupitt
a5e99b15df fix build without openjpeg
we had some dangling references
2021-04-30 11:40:04 +01:00
John Cupitt
7603c4b6ab fix some small bugs
- disable chroma subsample for jp2k-in-tiff ... it didn't work due to opj bugs
- revise numresolutions setting
- require opj 2.4 or later
2021-04-30 10:42:32 +01:00