The --rotate flag no longer did anything, so add a new --no-rotate flag
connected to the new no-rotate property. --rotate is still there, but
hidden and does nothing.
-o was much easier to remember than -f, so flip back to -o. -f still
works, but is a hidden synonym.
--iprofile, --eprofile were hard to remember. Add --import-profile and
--export-profile synonyms. iprofile / eprofile are still there and still
work, but are hidden.
This GIF has dispose set to DISPOSAL_UNSPECIFIED and seems to mean
transparent.
This patch makes gifload use DISPOSAL_UNSPECIFIED as well as _DO_NOT to
mean reuse previous frame.
Thanks DarthSim.
See https://github.com/libvips/libvips/issues/1543
We were usingh a global lock for metadata changes, but some functions
triggered from callbacks in the metadata hash table could also attempt
to acquire the same mutex, leading to deadlock.
This patch gives metadata change it's own lock. Thanks DarthSim.
See https://github.com/libvips/libvips/issues/1542
So:
vips_break_token( "hello\ world", " " )
Sees a single token, `"hello world"`.
This means you can now do things like:
$ vips arrayjoin "k\ 2.jpg" x.png
Where "k 2.jpg" is a filename containing a space.
See https://github.com/libvips/libvips/issues/1493
Another attempt at fixing crashes on metadata chenage in highly threaded
applications.
Global lock around set, remove and copy metadata. This is crude, but
simple, the performance impact should be small, and ought to resolve the
problem.
We'll do something better for the next version.
see https://github.com/lovell/sharp/issues/1986
We weer minimising sources in the ::minimise handler, but this is called
outside the lock that protects _generate. This patch removes minimise in
this case.
See https://github.com/kleisauke/net-vips/issues/53
We were attempting to load images in new_from_file using the new source
API first, then only falling back to the file loaders if that failed.
However, this meant that we did not respect the priority ordering on
loaders, so openslide iamges (for example) were being loaded by the tiff
loader.
We had a half-baked idea that RGB could mean generic RGB space and sRGB
would mean strict sRGB interpretation.
Unfortunately, this did not work well in practice. For example,
`icc_transform("srgb")` would tag the result as RGB rather than sRGB
(the converter didn't know it was writing sRGB pixels, it just saw
conversion to RGB with an ICC profile), and then later stages would do
unnecessary icc_imports, or worse, fail.
This patch makes RGB and sRGB strict synonyms. If you want to treat an
RGB image as something other than sRGB, you'll need to do it by hand
with the icc_ functions.
See
https://github.com/libvips/pyvips/issues/14446212e92b1 (r34904985)https://github.com/libvips/libvips/issues/1494
During write, we often call vips__exif_update(). This updates the exif
block from the other image metadata prior to save.
Always copy the image before calling this.
See https://github.com/lovell/sharp/issues/1986
sharpen with sigma 0.5 was doing nothing, since the new int precision
rules meant that we generated a point-point convolution.
This patch increases the int precision for sharpen, so we now work with
sigma down to 0.5.
Also: restore input colourspace. Previously, the output image was always
LabS (the computation space for sharpen). Now, it transforms back to the
input space. This is more in line with how other operators work.
Thanks 2h4dl for pointing this out.
See https://github.com/libvips/pyvips/issues/123
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
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