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
ImageMagick supports binary metadata with `ResetImageProfileIterator()`
etc.
Implementing support gives us xmp / ipct / icc support, plus perhaps
some others.
seems to work, still to do:
- tests
- try:
```
$ vipsthumbnail NordicsLIQUOR-SFBag_300_cmyk.JPG
(vipsthumbnail:7868): VIPS-WARNING **: 16:53:17.166: profile incompatible with image
```
see https://github.com/libvips/libvips/issues/1186
TIFF pyramids of images with a very extreme aspect raio could see layer
width or height drop to 0 before the image fitted in a single tile. This
change stops pyramid creation when width or height drop to 1.
See https://github.com/libvips/libvips/issues/1188
Fixes two issues:
1. vips_text() in autofit mode could set the wrong DPI, since it set the
DPI in its own copy of the variable, but did not do a final update on
the DPI setting that FT uses for rendering.
2. vips_text() in autofit mode allocated a new context each time, rather
than reusing the context for that call. This caused a small memory leak.
See https://github.com/libvips/libvips/issues/1174
the auto_rotate option of thumbnail was default TRUE which made it
useless from the CLI, since GOption only allows --switch, not
--switch=false
deprecate auto_rotate, add no_rotate, but allow either to be used
see https://github.com/libvips/libvips/issues/1146
- move x/y into composite and out of composite base, have separate x/y int
params for composite2
- upsize later for a small speed improvement
- doc comment
- note in changelog
see https://github.com/jcupitt/libvips/pull/934
eg. VImage::width() is now
int VImage::width() const;
ie. it does not alter the image objects. In factr we can mark almost all
members const.
see https://github.com/jcupitt/libvips/issues/983
Add a "background" option to pdfload to help support PDFs with a
transparent background. For example:
vips copy transparent.pdf[background=0] x.png
see https://github.com/jcupitt/libvips/issues/995
We had a global we incremented to allocate property ids, but of course that
won't work with DLLs. Instead, add vips_argument_get_id() and call that to
allocate new prop ids.
See:
https://github.com/jcupitt/libvips/issues/985
You must now include vips7 support explicitly with
#include <vips/vips7compat.h>
in your code just after including `vips.h`.
The old vips7 names, such as `Rect`, were starting to cause problems
with other packages like opencv.
Some magick coders (eg. ICO) don't sniff the filetype from the data, so
when you try to load from a string, imagemagick is unable to pick the
right decode path.
Add a @format option so callers can hint the filetype.
see https://github.com/jcupitt/pyvips/issues/39
libjpeg rounds up on shrink-on-load. In some cases this can leave a dark
line along the right and bottom edge, since it only contains (for
example) 1/4 of a pixel of data.
This change adds a crop after jpeg load so that only complete pixels are
output.
See https://github.com/lovell/sharp/issues/1185
If O_TNMPFILE is available, use it. This is a linux extension that
creates an unlinked file, so it'll be closed by the system when the last
associated fd is closed.
see https://github.com/jcupitt/libvips/pull/930
Before, they could make B_W for one-band output. This caused problems
with (for example) two black image bandjoined: the second band then
looked like an alpha to hasalpha() and enabled premultiply/unpremultiply
for operations like affine.
Now, it's always MULTIBAND. This is the generic multiband image type, so
you don't get any unexpected alpha handling.
The result of hasalpha is used to turn on things like
premultiplication, so we should be rather conservative
about when we signal this. We don't want to premultiply
things that should not be premultiplied.
Check Type as well as bands.
See: https://github.com/jcupitt/libvips/issues/918
libpng has started throwing hard errors if the profile does not match
the image -- this can happen all the time with perofiles inherited from
images that have been processed.
Test profiles before save and drop them (with a warning) if they are
incompatible with the image.
vips__get_bytes() used to fail if the file was too small for the
allocated buffer, which was a problem for svg, since files can be extremely
small.
This change makes vips__get_bytes() return the number of bytes read, so
the is_a testers can work on files smaller than the max header size.
icc_import can take a fallback input profile in case the embedded one is
broken or missing. If we use the fallback profile, this change attaches
it to the output image.
This means that icc_import will always output an image with the icc
profile that was used to import it. This helps to make the behaviour of
`thumbnail` more consistent.
See https://github.com/jcupitt/libvips/issues/152
If a delayed load failed, it could leave the pipeline only half-set up.
Sebsequent threads could then segv.
Set a load-has-failed flag and test before generate.
See https://github.com/jcupitt/libvips/issues/893
We were rounding up with ceil() when intize-ing convolution masks.
However, the vector path has a true range of (1.0, -1.0], so a mask with
1.0 as the max (for example) was actually triggering the overflow detector
and falling back to the C path.
Round up with ceil(x + 1) instead, so 1.0 (for example) will be mapped
to 0.5 and won't overflow.
vips_sink() used to just fire off threads willy nilly -- this could
cause problems with sequential images if a worker fell too far behind
the pack
copy over the area locking mechanism from vips_sink_memory(): new
threads are now stalled if an old thread has not finished
the new window manager code in 8.6.1 changed the prototype of an internal
function which was visible in the public API
this patch renames the function, adds it to an internal header instead,
and adds a stub for the old prototype
see https://github.com/jcupitt/libvips/issues/854
images under the disc threshold opened in random access mode from
sequential loaders would have the seq tag set on them, causing
performance problems with vips_resize()
see https://github.com/jcupitt/libvips/issues/840
make the code for error during jpeg buffer write a little cleaner --
rather than calling the jpeg term method ourselves, have a separate
destroy function for the write buffer