Commit Graph

29 Commits

Author SHA1 Message Date
John Cupitt 0029b3c416 require libjxl 0.7+ 2022-08-14 17:32:40 +01:00
Kleis Auke Wolthuizen f36196db1b
jxlsave: avoid using deprecated functions (#2989)
* jxlsave: avoid using deprecated functions

The upcoming libjxl 0.7 has deprecated a number of functions.

* Prefer to use `ifdef` instead
2022-08-14 15:54:21 +01:00
Kleis Auke Wolthuizen 34427d83a0
jxlsave: correctly mark frame as last (#2988)
It's required to close the input, otherwise the encoder can't
know what the last frame is, resulting in an improper codestream.

Resolves: #2987.
2022-08-14 15:53: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
John Cupitt 156e6a91e4 try to improve jxl lossless, again
now seems to handle scrgb and srgb, lossless and lossy, with and without
an ICC profile

see https://github.com/libvips/libvips/issues/2872
2022-06-18 16:01:51 +01:00
John Cupitt 48d13f4828 oop, left some DEBUG on 2022-06-13 10:27:42 +01:00
John Cupitt 9f3860ec22 fix up scrgb support in JXL
after some discussion on discord with the libjxl maintainers

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

to do: save scrgb to eg. JPEG fails right now :( we need to do
scRGB->sRGB in jpegsave
2022-06-12 16:43:26 +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
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
Lovell Fuller 7d4cba101c
jxl: remove support for never-implemented JXL_TYPE_UINT32 (#2813) 2022-05-21 09:49:31 +01:00
John Cupitt 58b53506ff
add vips_target_end (#2802)
since finish did not return an error code

also make sure we don't call target_end from inside _dispose, since that
can't signal error either

see https://github.com/libvips/libvips/issues/2801
2022-05-20 16:38:04 +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
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
Remi Collet 407bd1391d
allow libjxl 0.5 (#2539) 2021-11-16 09:51:19 +00:00
John Cupitt bd8fad842a call JxlEncoderInitBasicInfo
new mandatory API for libjxl v0.6
2021-10-12 17:10:55 +01: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 e00ca4e6b7 make jxlload/save a loadable module 2021-05-10 16:45:28 +01:00
John Cupitt 4e28039c02 fix distance 0 save, better error messages 2021-04-19 10:12:28 +01:00
John Cupitt 0cdfb851b9 incorporate comments from @lovell review 2021-04-18 17:53:15 +01:00
John Cupitt b1abb2d824 comment spelling 2021-04-15 12:55:14 +01:00
John Cupitt 2a51cf23a3 better Q computation
stolen from cjxl.cc
2021-04-14 17:34:30 +01:00
John Cupitt c48a82d937 cleanups 2021-04-14 16:39:57 +01:00
John Cupitt 4483a2edbc Merge branch 'master' into add-jxl 2021-04-14 15:08:46 +01:00
John Cupitt f4046a95f1 more dbg output for jxlsave 2021-04-14 12:50:09 +01:00
John Cupitt 633d35f4ae add Q param to jxl save
for convenience
2021-04-14 12:29:38 +01:00
John Cupitt 70078e3774 add jxl encoder options
though they don't seem to affect file size, curiously
2021-04-03 18:11:38 +01:00
John Cupitt b82ca537e7 set basic jxl image metadata from vips 2021-04-03 16:32:02 +01:00
John Cupitt e93d0ab83c jxlsave works
at a basic level, anyway
2021-04-03 15:03:43 +01:00
John Cupitt 10a0c5a4bb start adding jxlsave 2021-04-03 11:57:11 +01:00