there's a problem with out of bounds values, for example:
vips relational_const k2.jpg x.v equal 1000
actually finds pixels == 255, since 1000 is saturated converted to 255
before the test starts.
This patch reworks arithmetic against const values to fix this.
We close loaders early in order to save file handles, and on Windows to
make sure that files can be deleted as soon as possible.
Currently loaders do this by watching the Y coordinate of requests and
freeing the fd when the final line of the file is fetched. This is messy
and does not always work, since there are cases when the final line is
not fetched.
Instead, this patch gets loaders to listen for "minimise" on their
output and close on that. This signal is emitted on all upstream images
whenever a threadpool finishes a scan of an image and is usually used to
trim caches after computation.
See https://github.com/libvips/libvips/issues/1370
We were setting TIFFTAG_JPEGCOLORMODE == JPEGCOLORMODE_RGB for *all*
images, but libtiff warns if you use it on an image which is not
jpg-compressed.
Only set it for jpg-compressed images.
See https://github.com/libvips/libvips/issues/1329
By default librsvg blocks SVGs > 10MB for security. This patch adds an
"unlimited" flag to remove this check.
We have to switch to using gio to get the librsvg API for this This
needs testing on the platforms we support.
We'll also need to bump the min version of librsvg we require in
configure.ac.
See https://github.com/libvips/libvips/issues/1354
The autofit loop would terminate if either width or height fitted exactly,
but this could happen very early by chance. This patch makes it keep
looping until it finds a dpi which just fits.
See https://github.com/libvips/libvips/issues/1352
We used to try to spot webp images with no alpha and load them as plain
RGB, but it turns out this is difficult to do reliably, especially
for animated images.
This patch simply removes support, so all webp images now load as RGBA.
See https://github.com/libvips/libvips/issues/1351
We used to Ping files to see if IM would load them, but this can be
extremely slow for file formats like ARW.
Instead, use GetImageMagick() ... it just checks the magic number.
We were testing for TIFF by checking the magic number at the head of the
file. However, formats like ARW are TIFF-like without being TIFF, and
will not load with tiffload.
Instead, try reading the whole of the first directory. This is enough to
stop tiffload trying to load files where it will simply fail
immediately, and make libvips fall back to eg. imagemagick.
see https://github.com/libvips/libvips/issues/1304
composite could get mixed up blend modes if:
- many images being composited
- some small and positioned with x/y
- at least one unskippable blend mode
phew!
Some loaders were setting page-height even when the user was loading a
single page triggering unexpected multi-page behaviour from later
savers.
New rule: only set page-height when loading more than one page.
See https://github.com/libvips/libvips/issues/1318