Commit Graph

1963 Commits

Author SHA1 Message Date
John Cupitt 9fbf49cf60 Merge branch '8.10' 2020-10-06 11:43:13 +01:00
John Cupitt 80b73af225 note new "speed" param in heifsave
To help support the rapid move to AVIF.

see https://github.com/libvips/libvips/pull/1819#issuecomment-704145244
2020-10-06 10:50:06 +01:00
John Cupitt 727eb2ee39 Merge branch '8.10' 2020-10-03 18:29:23 +01:00
John Cupitt 0ee8b1e844 improve seek on pipes
There were a few issues in VipsSource around seeking on pipes. With this
patch, EOF detection is better, and pipe sources automatically turn into memory
sources when EOF is hit.

see https://github.com/libvips/libvips/issues/1829
2020-10-03 18:25:24 +01:00
John Cupitt a1505c6f72 add stdin, stdout to vipsthumbnail
eg.

	vipsthumbnail stdin[page=2] -o .jpg[Q=90]

mirror of syntax in new_from_file etc.
2020-10-02 16:46:03 +01:00
John Cupitt c27c471e28 Merge branch '8.10' 2020-09-28 12:33:32 +01:00
John Cupitt e3181e0579 get docs building with goi 1.66+
It builds now, but some doc sections are missing. Fix this properly in
8.11.

See https://github.com/libvips/libvips/issues/1836
2020-09-28 12:32:06 +01:00
John Cupitt b078c3c164 Merge branch '8.10' 2020-09-26 13:15:45 +01:00
John Cupitt 237604bb07 revise heifload EOF detection
VipsSource used a unix-style model where read() returns 0 to mean EOF.
libheif uses a model where a separate call to wait_for_file_size()
beforehand is used to check thaht the read will be OK, and then the
read() is expected to never fail.

We were trying to put EOF detection into libheif read(), but that's not
the right way to do it. Instead, test for EOF in wait_for_file_size().

see https://github.com/libvips/libvips/pull/1833
2020-09-26 13:00:52 +01:00
John Cupitt d967f2bf65 Merge branch '8.10' 2020-09-25 12:43:24 +01:00
John Cupitt cdae2c1995 note fractsurf fix in changelog 2020-09-25 12:43:04 +01:00
John Cupitt fd0a0905ff note VImage::new_from_memory_steal() in ChangeLog
plus doxy commnets etc., see https://github.com/libvips/libvips/pull/1758/
2020-09-24 10:44:49 +01:00
John Cupitt 01bbef36d5 Merge branch '8.10' 2020-09-23 08:14:47 +01:00
John Cupitt e4b711a358 better heif signature detection 2020-09-23 08:13:52 +01:00
John Cupitt fa260df262 Merge branch '8.10' 2020-09-21 09:45:34 +01:00
John Cupitt 54144a8bc5 allow gaussblur sigma 0
meaning no blur (obviosuly)
2020-09-21 09:45:08 +01:00
John Cupitt 0c7b65e156 allow both dpi and scale to be set for pdfload
pdfload didn't allow both dpi and scale to be set. This patch makes the
two settings combine if both are given.

thanks le0daniel

see https://github.com/libvips/libvips/issues/1824
2020-09-21 09:29:25 +01:00
John Cupitt d87a72c40d Merge branch '8.10' 2020-09-17 18:22:58 +01:00
John Cupitt dc88d6c1e1 fix dzsave iiif dimensions
dzsave in iiif mode could set info.json dimensions off by one

thanks Linden6

see https://github.com/libvips/libvips/issues/1818
2020-09-17 17:07:08 +01:00
John Cupitt a88c88bb7b Merge branch '8.10' 2020-09-15 10:20:15 +01:00
John Cupitt 0617165c66 raise minimum libheif version to 1.3
We didn't compile with anything less than 1.3 anyway.

see https://github.com/libvips/libvips/issues/1817
2020-09-15 10:18:38 +01:00
John Cupitt 7514afa1fa Merge branch '8.10' 2020-09-14 17:40:18 +01:00
John Cupitt 4227606f5a fix tiff thumbnail from buffer and source
We were missing the new tiff thumbnail logic on the source and buffer
paths.

see https://github.com/libvips/libvips/issues/1815
2020-09-14 17:38:20 +01:00
John Cupitt 48a2551957 fix TIFF thumbnail of buffer and source
We had dropped a couple of patches.

see https://github.com/libvips/libvips/issues/1815
2020-09-14 17:26:19 +01:00
John Cupitt f116d0b8e2 Merge branch '8.10' 2020-09-14 12:35:24 +01:00
John Cupitt 348e5e1523 don't set JFIF res if we will set EXIF res
Some JPEG loaders give priority to JFIF resolution over EXIF resolution
tags. This patch makes libvips not write the JFIF res tags if it will be
writing the EXIF res tags.

See https://github.com/libvips/ruby-vips/issues/247
2020-09-14 12:33:31 +01:00
John Cupitt 801111a2fa better dint rules
We had some special cases coded for dhint inheritance, but they could
fail in some edge cases. Revert to something simpler and more
predictable.

see https://github.com/libvips/libvips/issues/1810
2020-09-08 13:50:14 +01:00
John Cupitt 1864729771 Merge branch 'add-doxygen' 2020-09-06 14:03:29 +01:00
John Cupitt 17c16c0bb6 Merge branch '8.10' 2020-09-06 13:02:34 +01:00
John Cupitt 6b2079bfd3 update magick metadata naming
IM seem to have changed their rules for naming metadata chunks. They are
now lowercase and ICM is renamed to ICC. Add a simple test too.

See https://github.com/libvips/ruby-vips/issues/246
2020-09-06 12:59:10 +01:00
John Cupitt 8bdc327320 Merge branch '8.10' 2020-09-04 17:12:45 +01:00
John Cupitt 00096813da note render thread change in changelog 2020-09-04 12:41:19 +01:00
John Cupitt 610eea5462 Merge branch '8.10' 2020-09-03 19:33:09 +01:00
John Cupitt a88061dfec fix jpegload autorotate
thanks chregu

see https://github.com/libvips/php-vips/issues/105
2020-09-03 19:31:56 +01:00
John Cupitt 55d5837f0c Merge branch '8.10' 2020-09-01 12:38:58 +01:00
John Cupitt 20a5448da1 fix handling of "squash" param in tiffsave
the deprecated param was not being detected correctly, breaking vips7
compat in some cases

see https://github.com/libvips/libvips/issues/1801
2020-09-01 12:34:09 +01:00
John Cupitt a3dfa3911e Merge branch '8.10' 2020-08-31 14:10:43 +01:00
John Cupitt 285ab2e6cc better mask sizing for gaussmat
We were calculating the mask size incorrectly for small masks.

Thanks johntrunc

see https://github.com/libvips/libvips/issues/1793
2020-08-31 13:37:08 +01:00
John Cupitt 2c4c4132e8 Merge branch '8.10' 2020-08-28 17:47:40 +01:00
John Cupitt b07cfa858a note svg fix 2020-08-21 11:39:33 +01:00
John Cupitt 409301a200 improve C++ API
Make VObject inheritance public, so we can have a single set() for all
VObject-derived types.
2020-08-19 15:08:28 +01:00
John Cupitt f8faa5f7f7 Merge branch '8.10' 2020-08-19 11:12:18 +01:00
John Cupitt 270933c281 convert no-profile CMYK to RGB on save
Use the fallback cmyk profile to convert to RGB on save if the image has
no embedded profile.

Thanks augustocdias.

See https://github.com/libvips/libvips/issues/1767
2020-08-19 11:09:38 +01:00
John Cupitt 182e88957e prevent 0-length buffers reaching imagemagick
im6 seems to have added an assert for this

see https://github.com/libvips/libvips/pull/1785
2020-08-17 14:18:59 +01:00
John Cupitt cdcf63f8e5 fix regression in thumbnail of pyr tiff
The new subifd pyramid thumbnail code broke the old page-based pyramid
detector.

Thanks tand826

See https://github.com/libvips/libvips/issues/1784
2020-08-17 10:10:23 +01:00
John Cupitt 633abe7be8 add missing funcs to public C API
The C API was missing vips_jpegload_source and vips_svgload_source.
Thanks to augustocdias.

See https://github.com/libvips/libvips/issues/1780
2020-08-14 13:36:12 +01:00
John Cupitt b981911f67 remove redefinition of typedefs
We had this in a couple of places:

	typedef struct _A A;
	typedef struct _A A;

Some old gccs (eg. centos6) throw errors for this.

See https://github.com/libvips/libvips/issues/1774
2020-08-13 12:51:56 +01:00
John Cupitt fdded88cf7 start 8.10.1
following the doc generation fix
2020-08-09 14:39:37 +01:00
John Cupitt fcaba0e6ba add @profile to webpsave
small tiffsave fixes too
2020-07-18 14:49:37 +01:00
John Cupitt 7c2c152a74 note wasm patch in changelog 2020-07-03 02:21:16 +01:00
John Cupitt e4d38d1d3e clip out of bounds GIF images against the canvas
Some malformed GIFs have images which lie outside or partly outside the canvas.
With this patch, these frames are clipped and rendered.

Previously, these GIFs were rejected.

See https://github.com/libvips/libvips/issues/1701
2020-07-02 16:41:37 +01:00
John Cupitt 15e44f731f add spng in there twice 2020-06-30 11:31:33 +01:00
John Cupitt 2b2fabcd3b vipsheader allows stdin as a filename
```
$ cat k2.jpg | vipsheader stdin
1450x2048 uchar, 3 bands, srgb, jpegload_source
```

See https://github.com/libvips/libvips/issues/1594
2020-06-29 12:06:34 +01:00
John Cupitt 5540fa97f4 small cleanups for disable deprecated
- move matrixinvert to mosaicing, fix a leak
- add note to changelog
- small fixes

see https://github.com/libvips/libvips/pull/1593
2020-06-28 12:14:13 +01:00
John Cupitt 90e61a816b ... note change in ChangeLog
see https://github.com/libvips/libvips/issues/1585
2020-06-28 09:53:49 +01:00
John Cupitt d831ad34d5 add ppm load/save to a connection
plus some more tests
2020-06-27 15:23:18 +01:00
John Cupitt 4bf27acccb add 1/2/4 bit PNG save
- new @bitdepth param
- deprecate @colours param
2020-06-25 10:40:43 +01:00
John Cupitt 1f8d007d19 rename ppmsave "squash" as "bitdepth"
in line with the tiffsave change
2020-06-18 11:57:33 +01:00
John Cupitt 8b469b4516 adjust formatting of 2, 4 bit tiff load/save
To make it libvipsey. Small fixes as well.
2020-06-16 18:58:27 +01:00
John Cupitt 95406c7888
Merge pull request #1682 from libvips/libspng-experiment
Load PNGs with libspng
2020-06-12 19:11:42 +01:00
John Cupitt 8c19e07ae3 add --vips-config flag
so "vips --vips-config" now displays:

```
$ vips --vips-config
native win32: no, native OS X: no, open files in binary mode: no, ...
```
2020-06-12 17:30:57 +01:00
John Cupitt d5fcb6baaf
Merge branch 'master' into libspng-experiment 2020-06-12 12:42:11 +01:00
John Cupitt 4ae4be7046 note resize work in ChangeLog 2020-06-12 12:40:44 +01:00
John Cupitt 61628eefdf final fixes for spng loader 2020-06-11 13:24:27 +01:00
John Cupitt 1e015654c3 deprecate heifload autorotate
heifload autorotate is now always on, and we always delete EXIF
orientation tags. If a HEIC image fails to rotate upright, at least it's
someone else's fault.

see https://github.com/libvips/libvips/pull/1680
2020-06-10 19:57:50 +01:00
John Cupitt a44814018d Merge branch 'master' into libspng-experiment 2020-06-07 11:56:16 +01:00
John Cupitt 981d5c4b16 revise autorot system
- deprecate vips_autorot_get_angle() since orientation is no longer a
simple rotate
- add vips_image_get_orientation() and vips_image_get_orientation_swap()
- revise tiff and jpeg loader autorotate to just call vips_autorot(),
but only if necessary
- revise thumbnail autorotate too
2020-06-06 17:25:46 +01:00
John Cupitt cff84f4606 add subifd pyr support to thumbnail
thumbnail can spot subifd pyramids and load lower levels if necessary
2020-06-02 12:53:36 +01:00
John Cupitt ba0dea001d sort out premultiply rules for upsizing
vips_resize() uses vips_affine() for upsizing and vips_reduce() for
downsizing. Affine automaticaly does a vips_premultiply() for images
with an alpha channel, but reduce does not. This meant that we could
sometimes premultiply twice.

This patch adds a "premultiplied" flag for affine which turns automatic
premultiuplication off, vips_resize() uses this to block affine's auto
premul feature, and the resize docs are clarified to stress that the
operation does not do premultiplication for you.

See https://github.com/libvips/libvips/issues/1629
2020-05-19 14:31:34 +01:00
John Cupitt df4f03863e Merge branch 'master' into libspng-experiment 2020-05-13 14:37:00 +01:00
John Cupitt b9385b9d35 only warn on png save with a bad profile
Previously we failed. This is very ugly, but it seems to be the only
obvious way to fix this.

See https://github.com/libvips/libvips/issues/1578
2020-05-11 18:00:26 +01:00
John Cupitt 29d9fcb0c8 update docs for --delete deprecation
see https://github.com/libvips/libvips/pull/1564
2020-05-03 16:10:59 +01:00
John Cupitt 02327b6214 add an experimental libspng reader
it compiles, but I've not tried running it yet heh
2020-05-01 16:05:48 +01:00
John Cupitt 489810989e Merge branch '8.9' 2020-04-24 19:32:40 +01:00
John Cupitt efd62acccd better iiif tile naming
We were clipping edge tiles against the size of the scaled up layer.
Instead, clip against the size of the top level image.

See https://github.com/libvips/libvips/issues/1621
2020-04-24 19:29:35 +01:00
John Cupitt fada5f2a44 Merge branch '8.9' 2020-04-21 10:17:57 +01:00
John Cupitt 6f0548dc5c thumbnail could fail on HEIC in some modes
in locked UP or DOWN mode, vips_thumbnail() could incorrectly select the
thumbnail from a HEIC image even when it was not large enough to
generate the output image.

Thanks ZorinArsenij

See https://github.com/libvips/libvips/issues/1614
2020-04-21 10:15:02 +01:00
John Cupitt 681271e7b1 Merge branch '8.9' 2020-04-18 12:10:29 +01:00
John Cupitt 0897a77515 update changelog 2020-04-18 11:41:43 +01:00
John Cupitt 86bfadd101 better handling of unaligned tiff tile reads
We were not checking for alignment correctly in multi-page tiff reads.

Thanks petoor.

See: https://github.com/libvips/pyvips/issues/172
2020-04-11 14:36:44 +01:00
John Cupitt 471ec9bcc0 fix flood fill on some complex shapes
could fail to paint everything sometimes
2020-04-05 12:33:55 +01:00
John Cupitt 834234c23c add `all` smartcrop mode
So you can crop to fill as well as crop to fit.

see https://github.com/libvips/libvips/issues/1583
2020-03-19 18:57:40 +00:00
John Cupitt 3b57e13452 move heifsave to new target API
and add heifsave_target
2020-03-15 18:17:08 +00:00
John Cupitt 0badb7c603 add heifload_source 2020-03-15 11:45:56 +00:00
John Cupitt 764b196d50 move pdfload on top of source API
and add pdfload_source

see https://github.com/libvips/libvips/issues/1541
2020-03-11 18:15:15 +00:00
John Cupitt 03399b4d7e tiff write sets page number
tiffsave sets `PAGENUMBER` and `FILETYPE_PAGE`, thanks jclavoie-jive

see https://github.com/libvips/libvips/issues/1565
2020-03-08 11:06:19 +00:00
John Cupitt a592d99bb2 add dir detector
useful for blocking open for read of directories
2020-03-06 18:05:16 +00:00
John Cupitt 68f766b482 Merge branch '8.9' 2020-03-05 15:03:00 +00:00
John Cupitt b3a7929247 detect read errors in sniff correctly
we has a signed/unsigned mixup :(
2020-03-05 15:02:16 +00:00
John Cupitt 7d3a7e9c29 Merge branch '8.9' 2020-02-28 15:23:31 +00:00
John Cupitt ab5d511123 add fuzz corpus 2020-02-28 15:22:10 +00:00
John Cupitt 1a0e61510b rewrite matrixsave
uses new target API
2020-02-22 17:55:04 +00:00
John Cupitt ce240b1ca2 revise matrixload for source API 2020-02-22 15:02:12 +00:00
John Cupitt d68e02a3c4 Merge branch 'revise-csvload' 2020-02-21 18:23:13 +00:00
John Cupitt bab3486aca fix lines param to csvload
we had lines and skip mixed up
2020-02-21 18:22:39 +00:00
John Cupitt 0a23bf3578 revise formatting, add docs
fix up some formatting from https://github.com/libvips/libvips/pull/1552

plus some other small changes
2020-02-18 17:37:56 +00:00
John Cupitt d8ee83e35e Merge branch 'master' of https://github.com/wix-playground/libvips into wix-playground-master 2020-02-07 16:30:26 +00:00
alon-ne f88dab9ccd
Fix gif dispose handling for DISPOSE_BACKGROUND and DISPOSE_PREVIOUS
- Add 'scratch' field to gif that holds temporary 'scratch buffer' used for rendering frames
- For DISPOSE_BACKGROUND: Set background color to transparent instead of 0
- For DISPOSE_BACKGROUND: Write background pixels into scratch after rendering current frame, so it will be used in next frame
- For DISPOSE_PREVIOUS: Save frames that are not disposed into 'previous' field in gif, when DISPOSE_PREVIOUS is specified start with that previous frame. see http://webreference.com/content/studio/disposal.html
- Add "ANIMEXTS1.0" to Application Extension parser
- Graphic Control Extension parser refactor
- Compare file contents to expected images for animated gifs in foreign tests
2020-02-06 17:36:13 +02:00
John Cupitt 862e1ae214 add VIPS_LEAK env var 2020-02-03 17:01:57 +00:00
John Cupitt 559ae542ac revise flags for vipsthumbnail
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.
2020-02-03 14:49:21 +00:00