Commit Graph

416 Commits

Author SHA1 Message Date
Daniel Löbl 0b70145d99
cgifsave: add support for interlaced GIF write (#2984)
* cgifsave: add support for interlaced GIF write

note: cgif >= v0.3.0 is required

* switch to warning instead of error

* add test

* fix test
2022-08-15 12:14:02 +01:00
John Cupitt b4bfaeb980 Merge branch '8.13' 2022-08-14 12:16:10 +01:00
John Cupitt 94d3f93a46 add another low bitdepth png save test 2022-08-14 11:05:09 +01:00
John Cupitt 7e961b4671 Merge branch '8.13' 2022-08-02 14:22:27 +01:00
John Cupitt 2c4c039056 add "unlimited" to jpegload
To disable DoS limits for JPEG loading. Adding API on a stable branch is
bad, but this fixes a regression, so I think it's necessary,
unfortunately.

See https://github.com/libvips/libvips/issues/2973
2022-08-02 13:50:09 +01:00
Kleis Auke Wolthuizen 3f95543c2c
Allow to modify/create EXIF GPS* tags (#2966)
* Allow to modify/create EXIF GPS* tags

Make `tag_is_ascii` aware of the EXIF GPS* ASCII tags that are
available since libexif 0.6.23.

See: https://github.com/lovell/sharp/issues/2767

* Add tests
2022-07-30 19:21:54 +01:00
John Cupitt d17fd9b640 fix matlab block test 2022-07-30 12:36:56 +01:00
Kleis Auke Wolthuizen 673a593161
test: remove `TestIofuncs::test_split7` (#2954)
See: https://github.com/libvips/pyvips/pull/341
2022-07-28 12:37:35 +01:00
John Cupitt ffe13810fb
Remove cruft (#2942)
* remove autotools

It seems to all work. I tested with gtk-doc enabled. I probably missed a
few things argh.

* remove some old cruft

* oop, forgot m4/

* remove version check

since we no longer have a wrapper script
2022-07-24 11:18:30 +01:00
John Cupitt 538aa2a841
remove autotools (#2941)
* remove autotools

It seems to all work. I tested with gtk-doc enabled. I probably missed a
few things argh.

* oop, forgot m4/
2022-07-24 11:14:52 +01:00
Kleis Auke Wolthuizen ae831a145e
Cleanup .gitignore (#2889)
* Cleanup .gitignore

* Re-add `patches` directory to `Makefile.am`

And ensure it's being tracked by git.
2022-06-23 16:36:47 +01:00
John Cupitt 1c600c83b6 test jp2k in test_formats.sh 2022-06-23 10:03:29 +01:00
John Cupitt d9f31be67d configure should add meson files to make dist
add meson.build etc. to EXTRA_DIST

see https://github.com/libvips/libvips/issues/2876
2022-06-20 15:04:33 +01:00
John Cupitt c61b458904 add jxlsave tests
and revise colour encoding set

see https://github.com/libvips/libvips/issues/2872
2022-06-18 16:40:10 +01:00
Kleis Auke Wolthuizen 468c13693b
CI: upgrade runner to Ubuntu 22.04 (#2850)
* CI: upgrade runner to Ubuntu 22.04

- Compile with GCC 11 and Clang 14.
- Remove redundant PPAs.
- Use system provided Meson.
- Update LeakSanitizer suppressions.

* CI: ensure `VIPS_BLOCK_UNTRUSTED` is tested

`magicksave` cannot be used for testing when building with
`-Dmodules=enabled` (default), since that would require the
loadable modules to be installed first.
2022-06-12 12:24:30 +01:00
John Cupitt b0f38b5197 add tests for tiffload/save_target, dzsave_target 2022-06-12 12:18:45 +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 e42d2b46b9 revise SVG scaling, again
we were not defaulting width and height correctly

see https://github.com/lovell/sharp/pull/3230
2022-05-18 10:55:41 +01:00
Kleis Auke Wolthuizen d91cfa4e53
Allow to modify/create EXIF 2.3 ASCII tags (#2795)
* Allow to modify/create EXIF 2.3 ASCII tags

Make `tag_is_ascii` aware of the EXIF 2.3 ASCII tags that are
available since libexif 0.6.22.

See: https://github.com/kleisauke/net-vips/issues/167

* Fix CI
2022-05-10 08:13:22 +01:00
Kleis Auke Wolthuizen 894ed1cb13
Resize improvements; add `ceil` and `gap` options (#1769)
* Add a round-up option to shrink

* Only leave the final 200% to reduce

* Add gap option to reduce and resize

* Add unit tests

* Incorporate feedback
2022-05-07 12:45:38 +01:00
John Cupitt eba9ec0dd7
Add a way to disable less well tested operations (#2636)
* quick proposal

warn on startup if untrusted operations might run

use vips_block_untrusted_set() to block untrusted operations, set an env
var or make a file to stop the warning

* mark fits, nifti and svg as untrusted

* remove the annoying "untrusted" warning message

better to warn on the download page

leave vips_block_untrusted_set() since it's obviously useful

* separate UNTRUSTED and BLOCKED

* typos

* add VIPS_BLOCK_UNTRUSTED env var

* move BLOCK_UNTRUSTED after plugin load

obviously, ooops

* add a test, disable *magick

although *magick is fuzzed, it's probably safer to disable it in
untrusted environments

* mark some more operations as untrusted
2022-04-11 11:32:32 +01:00
John Cupitt 168d7652c2 Merge branch '8.12' 2022-03-11 16:25:11 +00:00
John Cupitt f0eb493643 fix thumbnail with cmyk output
see https://github.com/libvips/php-vips/issues/138

thanks AdamGaskins
2022-03-11 16:21:12 +00:00
John Cupitt 356edc3779 revise tests for new libnsgif loop behaviour
see https://github.com/libvips/libvips/pull/2712
2022-03-09 10:20:41 +00:00
John Cupitt 3073ee90b7
Improve edge handling for mapim (#2681)
* almost there

* smol changes

* getting close now

segv on the test suite, annoyingly

* argh still not quite thert

* phew
2022-02-28 09:12:09 +00:00
Lovell Fuller 4ca4b07654
heifload: add unlimited option, default to false (#2677) 2022-02-23 10:34:07 +00:00
John Cupitt 542cfff472 longer timeout for tests
to allow for slowdown with sanitizers enabled
2022-02-19 16:06:29 +00:00
Kleis Auke Wolthuizen 3da7caee6c
LSan improvements and fixes (#2672)
* LSan: remove GLib suppression

* LSan: disable the fast unwinder to get full stacktraces

* Move ASan/UBSan fuzzer options to CI configuration

* LSan: remove EOLed python2.7 suppression

* LSan: remove libstdc++ suppression

* LSan: add libx265 to suppression file

* Try to reproduce small memleak

* Try a possible patch

* Skip test if `im_benchmark` is not available

* CI: upgrade Clang version to 13

* CI: correct job names

* Meson: increase the timeout for tests

* README.md: correct Meson invocation
2022-02-19 15:13:42 +00:00
John Cupitt 094e84d6d1 relax accuracy test for 16 bit heic
since it seems rather poor with the libheif on ci runner
2022-02-18 11:55:27 +00:00
John Cupitt e985e23c09
add HDR support to heif load/save (#2596)
* heifload done, doing save

* finish save, add tests, docs
2022-02-18 11:16:15 +00:00
Corentin Noël 02901436d4
Add meson build system (#2637)
Allows to use the Meson build system to build the project.
2022-02-08 15:19:36 +00:00
Kleis Auke Wolthuizen 5414ddfa80
Minor improvements (#2556)
- Remove unused libgif-dev dependency from CI.
- Remove no longer relevant comment from testsuite.
- Use yes/no instead of boolean values in configure.ac.
2021-11-25 10:51:34 +00:00
John Cupitt b889181966 version bump for 8.13
and revise quant package detection
2021-11-21 11:29:28 +00:00
Moggers b3ff4d9ed6
Implement Header Sniffing For Magickload Tga (#2533)
Add TGA sniffing
2021-11-14 04:04:32 +00:00
Kleis Auke Wolthuizen 008fe2d2f5 Add unit test 2021-11-13 11:29:46 +01:00
John Cupitt c6d863f9d3 fix inverse hyperbolics
oop, typo
2021-11-02 22:58:19 +00:00
Heshy Roskes d8c04011ea
Add hyperbolic functions (#2508)
* add hyperbolic functions
* add hyperbolic function tests
* changelog
* add inverse hyperbolic functions for old compilers
2021-11-02 15:05:37 +00:00
John Cupitt 0c70f3dc7d
add fail-on : better control over loader error handling (#2360)
Instead of a simple fail/don't-fail boolean switch, add fail-on, an enum which sets the sensitivity of loaders to errors. 

There's a new sensitivity level which tries to detect truncated images, but ignores other types of error.
2021-10-31 14:13:18 +00:00
John Cupitt a16f118b0c speed up test suite
ouch we were making a huge avif image in memory
2021-10-25 20:40:42 +01:00
Kleis Auke Wolthuizen 29fb557e24
Temporarily skip `test_heifsave` on macOS (#2494) 2021-10-21 18:14:40 +01:00
John Cupitt de6e2fef9e add a test for atan2
and tiny formatting changes
2021-10-20 20:40:39 +01:00
John Cupitt 444a04e94f formatting, another MCU test 2021-10-08 17:58:17 +01:00
David Manthey 46a67cfab9
Add jpeg restart_interval option. (#2468)
* Add jpeg restart_interval option.

This allows saving a jpeg with MCU restarts.

* Fix code style.  Add description of restart_interval.

* Add a basic test based on output length.

* Update main change log.
2021-10-08 17:33:32 +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
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
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 b9230edcbe Merge branch '8.11' 2021-08-29 19:13:12 +01:00
Lovell Fuller 1f5d6f6bc9
Add gifsave operation, depends on cgif and libimagequant (#2381) 2021-08-22 18:11:41 +01:00
Doug Nazar 97f5417aaa
Fix tests when using a separate build dir. (#2405) 2021-08-18 11:45:02 +01:00
Kleis Auke Wolthuizen b978ed8e8f
Adapt `TestForeign.test_heifsave` test (#2402)
- `heifsave` defaults to AV1 compression for .avif suffix since commit 8c44863.
- Test lossless compression mode.
2021-08-16 22:25:14 +01:00