Commit Graph

16 Commits

Author SHA1 Message Date
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
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
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
4f762d6609 add vips_niftiload_source() 2021-02-12 15:29:58 +00:00
John Cupitt
7b2729adfa fix up nifti load/save
- use double for all floating point scalar metadata, like other loaders
- remove use of stray "n" property
2019-09-09 16:06:22 +01:00
John Cupitt
cf860b27fa start working over thumbnail to support anim 2019-02-19 17:27:23 +00:00
John Cupitt
8730d8ddf1 add nifti ext save 2018-07-20 18:20:26 +01:00
John Cupitt
d03416d386 works!
just needs some tests

could be faster too
2018-07-19 17:45:54 +01:00
John Cupitt
9179156132 almost working
get a 1x1 pixel output now
2018-07-19 16:06:21 +01:00
John Cupitt
06a40cc7ee sort-of works
but can't set meta correctly, try:

	$ vipsheader -a sub-CC00050XX01_ses-7201_T2w.nii.gz

see all fields, but

	$ vips copy sub-CC00050XX01_ses-7201_T2w.nii.gz x.v
	$ vipsheader -a x.v

only see a few, odd
2018-07-18 17:09:53 +01:00
John Cupitt
1028907e58 more save work 2018-07-16 12:49:12 +01:00
John Cupitt
7496381fc9 more getting ready for niftisave 2018-07-13 13:08:23 +01:00
John Cupitt
d186ac69d6 a more more work on niftisave 2018-07-10 17:16:49 +01:00
John Cupitt
34bb1fc83c save framework done 2018-07-06 11:53:35 +01:00
John Cupitt
76eef8912e start niftisave 2018-07-05 17:38:37 +01:00