Commit Graph

7891 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen
7553f60aed
Minor cleanups (#2857)
- Remove `HAVE_LCMS` definition in favor of `HAVE_LCMS2`.
- Remove `HAVE_WINDOWS_H` definition in favor of `G_OS_WIN32`.
- Remove stray `vips_text_get_type` in `conversion.c`.
- Remove duplicated `unistd.h` include.
- Remove redundant `strcasecmp` definition, we use `g_ascii_strcasecmp` everywhere.
- Remove unnecessary header checks in `configure.ac` and `meson.build`.
- Ensure `unistd.h` include is guarded with `HAVE_UNISTD_H`.
- Fail early when `-Dfontconfig=enabled` and `pangoft2` is not found.
2022-06-12 12:22:36 +01:00
John Cupitt
7fbdb01fb9
try to make cgifsave easier to read (#2853)
* try to make cgifsave easier to read

and fix a few memory errors

* move another loop out of write_frame

slightly smaller
2022-06-12 11:25:32 +01:00
John Cupitt
b74504b985 Merge branch 'master' of github.com:libvips/libvips 2022-06-12 11:08:47 +01:00
John Cupitt
687209e1cb add some notes on getting nifti working 2022-06-12 10:41:02 +01:00
Kleis Auke Wolthuizen
296c263099
Meson: maintain autotools compatibility on macOS (#2856)
By setting the correct compatibility/current version.
2022-06-11 22:54:43 +01:00
Kleis Auke Wolthuizen
cdf12dd849
Mark Poppler as untrusted (#2855) 2022-06-11 16:25:28 +01:00
Kleis Auke Wolthuizen
1214f942f9
Prefer to use flags |= everywhere (#2854)
Use the bitwise OR assignment operator to ensure that derived
classes does not overwrite the flags from the base class. Also,
move the flags from `openslideload_source` to its base class.
2022-06-11 15:40:39 +01:00
John Cupitt
c7baa4535a cleaner blocking code
thanks kleis!
2022-06-11 15:37:27 +01:00
John Cupitt
399fba2124 fix error in prev commit 2022-06-11 14:03:45 +01:00
John Cupitt
8bf90ed44e fix BLOCK_UNTRUSTED after previous commit 2022-06-11 12:38:43 +01:00
John Cupitt
bd65ddda66 fix operation_block_set
kleis discovered that it needs a full class name, and found a missing
"*"
2022-06-11 11:41:03 +01:00
John Cupitt
da73a24b8f Merge branch 'master' of github.com:libvips/libvips 2022-06-10 18:08:56 +01:00
John Cupitt
26f8b8a249 vips_block_untrusted_set was named wrongly 2022-06-10 18:08:27 +01:00
Kleis Auke Wolthuizen
bae0342d95
Update C++ binding and function list (#2851)
* Update C++ binding and function list

Also, start with a capital letter in descriptions whenever possible.

* Ensure `dzsave_target` is generated
2022-06-10 14:43:44 +01:00
Kleis Auke Wolthuizen
45a99238e2
text: use MT-safe pango_cairo_font_map_get_default (#2848)
* text: use MT-safe `pango_cairo_font_map_get_default`

* Increase minimum Pango version to v1.32.6 (released Jan 2013)
2022-06-08 16:06:45 +01:00
John Cupitt
b086b3f61a tiny formatting changes
and we can remove a vips__quantise_get_palette()
2022-06-08 15:43:28 +01:00
Sergey Alexandrovich
19bef959d1
cgifsave: palette change POC (#2824)
* cgifsave: compare palettes instead of frame sum

* Add vips__quantise_image_quantize_fixed function
2022-06-08 15:27:29 +01:00
Kleis Auke Wolthuizen
5106e9b49e
text: ensure fontconfig cache of Pango is invalidated (#2847)
See: https://gitlab.gnome.org/GNOME/pango/-/issues/551
2022-06-08 15:20:19 +01:00
John Cupitt
2d0c6b364c improve scaling of SVG images
We were not scaling images with fixed absolute dimensions.
2022-06-06 12:08:43 +01:00
John Cupitt
586fb31550 switch svgload to random access
and fix up pdfload random access
2022-06-05 15:57:43 +01:00
Sergey Alexandrovich
4fab8beae9
cgifsave: theshold alpha and check alpha constraint in one pass (#2827)
* cgifsave: theshold alpha and check alpha constraint in one pass

* cgifsave: get rid of sqrt()
2022-06-03 18:49:03 +01:00
John Cupitt
cb1927e1b7 make C and vector path for composite match
one was <, one was <= for HARD_LIGHT
no effect on result, but it's better if they are consistent
2022-06-03 16:15:51 +01:00
John Cupitt
af23e9f06c tiny formatting fixes 2022-06-01 12:33:43 +01:00
Sergey Alexandrovich
c9b5b8c197
nsgifload: add "palette-bit-depth" header (#2828) 2022-06-01 12:27:10 +01:00
John Cupitt
6260a37136
add libjxl ICC and scRGB support (#2815)
* add ICC and scRGB support

see https://github.com/libvips/libvips/issues/2568

* final polish
2022-05-28 13:55:45 +01:00
Daniel Löbl
ed79cfba7e
magicksave: Add bitdepth option (#2819)
* flag to save bmp with bitdepth 1

* magicksave: add bitdepth option

* update comments

* update documentation

* revised based on review comments

Co-authored-by: Thomas Barton <thomasryanbarton@gmail.com>
2022-05-27 11:41:01 +01:00
John Cupitt
2af2ca5ca2 add note about palette sorting by quantisers 2022-05-26 17:41:51 +01:00
Kleis Auke Wolthuizen
550781cd18
spngsave: fix 8bpp palette save with transparency (#2808) 2022-05-26 17:26:26 +01:00
John Cupitt
7121f952d5 revise formatting 2022-05-26 17:25:16 +01:00
Sergey Alexandrovich
ba04c5f03f
cgifsave: fill transparent pixels with zeroes (#2823) 2022-05-26 17:23:04 +01:00
Kleis Auke Wolthuizen
a96dd73648
doc: add missing files and use full paths (#2822)
* doc: add missing files and use full paths

It seems that private_headers didn't work for out-of-tree builds.
This commit makes it use full paths and adds a few missing files.

* cplusplus: use the correct `install_dir` for the Doxygen docs
2022-05-26 08:48:31 +01:00
John Cupitt
111eef0049 lock progress to 100% on posteval
Because signals can be delayed, progress isn't always 100% in posteval.
Lock it to 100%.

See https://github.com/libvips/libvips/issues/2820
2022-05-23 19:27:40 +01:00
John Cupitt
a9bfd508f5 revise cgifsave checksum
We were calling it a sum and looking for a change threshold, but really
it's only useful as a checksum and does not have a magnitude. Revise
comments and variable names to reflect this.
2022-05-23 13:17:20 +01:00
John Cupitt
89bbb7981d oop dbg left on 2022-05-23 13:07:38 +01:00
John Cupitt
63962056f0 small formatting fixes 2022-05-23 13:02:44 +01:00
Daniel Löbl
f26f0b09b8
cgifsave: reuse global palette, if possible (#2797)
* save GIF palette as metadata

... if there are no local colour tables.

See https://github.com/libvips/libvips/issues/2576

* cgifsave: reuse global palette, if possible

* add reuse_palette parameter

* add reoptimise parameter and reuse palette by default

* attach global palette even if local palettes are present

* add check for presence of use-lct

* Revert "add check for presence of use-lct"

This reverts commit cd0f14e45e8bed8f108ee9666e2569c6355f17eb.

* Revert "attach global palette even if local palettes are present"

This reverts commit 4085b9e14b73c8990e9653ccc6f90477c2a43032.

* move global palette quantization to cgif_build

* rename member variable gct

* update comments

* improve error handling

* update documentation

Co-authored-by: John Cupitt <jcupitt@gmail.com>
2022-05-23 13:01:26 +01:00
John Cupitt
7d3aaf540c small formatting 2022-05-23 12:42:26 +01:00
John Cupitt
047bef50d9 fix spngsave conversion
It was all mixed up. We don't need to call colourspace -- this is done
for us by the SAVEABLE system.

Fixes "vips identity x.png" error, see:

https://github.com/libvips/libvips/pull/2808#issuecomment-1133947162
2022-05-23 11:51:54 +01:00
Kleis Auke Wolthuizen
85c24481be
svgload: recognize dimensions for SVGs without width/height (#2817)
Rather than defaulting to 1928x1080. Also, prefer to use the
`LIBRSVG_CHECK_VERSION` macro instead of our configure checks.
2022-05-23 10:39:53 +01:00
John Cupitt
111f1d11df improve the interpretation sanity checker
it was rejecting int LABS
2022-05-22 14:05:01 +01:00
John Cupitt
fd495bcd0a fix typo in tatrgetcustom.c
see https://github.com/libvips/libvips/pull/2802#pullrequestreview-980832505
2022-05-21 17:30:55 +01:00
Lovell Fuller
c1f6995256
Pass close-on-exec flag to lcms for non-Windows OS (#2816)
This ensures child processes do not inherit open file descriptors
and will close a small but long-standing bug reported against
sharp over five years ago.

The change to lcms2 to support this is backwards compatible so
the flag will be ignored by existing versions.

The fopen 'e' flag will soon be part of the POSIX standard, and
is already supported in Linux and BSD. macOS currently ignores
it but will add support soon. Only Windows has a problem with it,
hence the ifdef wrapper.
2022-05-21 17:28:40 +01:00
John Cupitt
2ef1b198fb fix deprecation warning 2022-05-21 12:43:57 +01:00
John Cupitt
bf614530cd use vips__bgra2rgba() in pdfiumload
slightly quicker, works with any byte order
2022-05-21 10:32:23 +01:00
John Cupitt
83bf777325 Merge branch 'master' of github.com:libvips/libvips 2022-05-21 10:18:07 +01:00
Sergey Alexandrovich
985fb1d1d0
Don't paint the background if the PDF has transparency (#2804) 2022-05-21 10:17:44 +01:00
John Cupitt
3d0912ea68 Merge branch '8.12' 2022-05-21 09:53:37 +01:00
John Cupitt
6e80364e0a fix jxl compat break
note in changelog

see https://github.com/libvips/libvips/pull/2813
2022-05-21 09:52:58 +01:00
Lovell Fuller
e522b4ff90 jxl: remove support for never-implemented JXL_TYPE_UINT32 (#2813) 2022-05-21 09:52:11 +01:00
Lovell Fuller
7d4cba101c
jxl: remove support for never-implemented JXL_TYPE_UINT32 (#2813) 2022-05-21 09:49:31 +01:00