-
It seems that when magick serializes files to disk, there are cases where these files won't get removed either by magick or by libvips. This can swell disk usage quite a bit: the issue here describes This is unfortunately difficult to reproduce. My attempt was to use the env variables like If I know the envs work, I can prevent ImageMagick from serializing altogether by setting |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
Hi @mertalev, Ouch that's bad. Magick will go via disc for some delegate formats. The obvious ones are PDF (delegated to ghostscript), SVG (delegated to inkscape), and raw camera formats (usually delegated to ufraw I think). There are probably others. It handles these formats by shelling out to to eg. ghostscript to render the file to PNM in I think I would just turn off magickload and try to find out what formats users are uploading that need it. I'd guess raw camera files, but of course that's just a guess. Maybe there's some other way to support these images? |
Beta Was this translation helpful? Give feedback.
-
libvips 8.13 added a system to let you block operations at runtime: https://www.libvips.org/2022/05/28/What's-new-in-8.13.html If you set |
Beta Was this translation helpful? Give feedback.
-
I had a quick look at immich. Nice job! There's a new chapter in the docs for 8.16 with some suggestions for any devs working with libvips: https://github.com/libvips/libvips/blob/master/doc/Developer-checklist.md It might be worth a quick look. |
Beta Was this translation helpful? Give feedback.
Hi @mertalev,
Ouch that's bad.
Magick will go via disc for some delegate formats. The obvious ones are PDF (delegated to ghostscript), SVG (delegated to inkscape), and raw camera formats (usually delegated to ufraw I think). There are probably others.
It handles these formats by shelling out to to eg. ghostscript to render the file to PNM in
/tmp
, then loading the PNMs back in as a bitmap to be returned to the caller. Obviously shelling out to an external program and passing the image back in via a temp file is pretty inefficient, which is one of the main reasons libvips magickload is not really suitable for production use.I think I would just turn off magickload and try to find out what…