Commit Graph

5819 Commits

Author SHA1 Message Date
John Cupitt
675c6361eb revise page-height rules again
Only set `page-height` if `n` is set as an argument. This means you only
get a multi-page image if you specifically ask for it.
2019-05-29 14:18:46 +01:00
John Cupitt
bd8a6980f5 more consistent behaviour for multi-page load
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
2019-05-29 10:10:28 +01:00
John Cupitt
c7e213a9fa LinearGRAYColorspace is rather recent, it seems 2019-05-24 17:47:50 +01:00
John Cupitt
02bdb8b96c better error message for "unsupported colorspace"
we just printed the enum number before
2019-05-24 17:42:10 +01:00
John Cupitt
5855321638 improve realpath() compat on older libc
older libc didn't allow a NULL for the second param
2019-05-24 15:24:18 +01:00
John Cupitt
da402cee23 faster and more accurate bilinear
go to fixed point earlier in calculation of interpolation coefficients
2019-05-14 13:10:45 +01:00
John Cupitt
29d9673fd8 update comment 2019-05-14 08:20:30 +01:00
John Cupitt
44afdbc314 more accurate bicubic of int16 images
use float path for int16 -- the fixed-point path can miss by a small
amount

see https://github.com/libvips/libvips/issues/1309
2019-05-13 22:05:41 +01:00
John Cupitt
c9ba0915c1 more accurate bilinear for int16 pixels
fixed-point interpolation could give small errors

see https://github.com/libvips/libvips/issues/1309

need a similar change for bicubic etc.
2019-05-13 18:32:48 +01:00
John Cupitt
a02229245e tidy up conditionals a bit 2019-05-10 16:43:17 +01:00
John Cupitt
b2ad9f9df8 better compat with older libheif
We were looking for "yes" from the builtin_h265_decoder variable to
enable heifload, but this variable was only added in libheif 1.3, so we
failed to turn on heifload correctly.

We now look for not "no", ie. default on.

See https://github.com/libvips/build-win64/pull/26#issuecomment-490854408
2019-05-10 12:59:24 +01:00
John Cupitt
3e60e816ed split heifload / heifsave
test for libheif supporting decode and encode, and turn heifload and
heifsave on and off
2019-05-08 21:13:00 +01:00
John Cupitt
b680d9f833 split heifload / heifsave tests
to allow building with the de265 decoder, but not the GPL ffmpeg x265 encoder
2019-05-08 20:42:38 +01:00
John Cupitt
d5ca1ddfd4 all tested and working
revised formula for in/out/dest-in/dest-out, for vector and scalar paths

see https://github.com/libvips/libvips/issues/1301
2019-05-08 18:16:40 +01:00
John Cupitt
447e0f3ea2 Merge branch 'master' into revise-composite 2019-05-08 16:14:01 +01:00
John Cupitt
3921e63561 fix vips image writes of more than 2gb
With very wide images and huge numbers of threads, it was possible to
trigger an int overflow in write_vips().

Thanks @erdmann

See https://github.com/libvips/libvips/issues/1306
2019-05-07 13:56:52 +01:00
John Cupitt
bcdaeca578 fix anim webp load for some sizes
rounding on resize for each frame needs to match resize for whole image
2019-05-01 16:34:58 +01:00
John Cupitt
b1c995b2d9 more animated webp load fixes
webpload scale on load works for animated images
2019-05-01 16:25:13 +01:00
John Cupitt
37865e34f8 oop silly webp jpg mixup in last commit 2019-04-30 20:07:08 +01:00
John Cupitt
394f9baa5e deprecate webpload @shrink, use @scale instead
We need a fractional scale for thumbnail on webp to work well. @shrink
still works, but @scale overrides it.
2019-04-30 18:29:16 +01:00
John Cupitt
ec0b7e7bdf fix pdf test
for new sizing rules
2019-04-30 16:24:36 +01:00
John Cupitt
29d29533d4 better pdfload page size rounding
We were doing simple round down for page size with @scale param. But
this makes it very sensitive to rounding errors, so do rint() instead.

vips-resize() does rint() on the output size as well for the same
reason.

See https://github.com/libvips/libvips/issues/1297#issuecomment-487682785
2019-04-30 16:08:26 +01:00
John Cupitt
7326a409c6 reenable webp shrink-on-load in thumbnail
the breakage is in animated webp load with preshrink rather than
thumbnail
2019-04-29 17:30:34 +01:00
John Cupitt
ea9e477ad3 better gif-loop handling (again)
setting loops to 0 was broken
2019-04-29 17:12:20 +01:00
John Cupitt
522ddc1430 better thumbnailing of multipage docs
shrink-on-load should now work for multipage PDF thumbnailing

see https://github.com/libvips/libvips/issues/1297
2019-04-29 17:05:19 +01:00
John Cupitt
8482aa3ff1 tiny cleanup
some left-over pyramid detection code in tiff2vips
2019-04-29 12:52:47 +01:00
John Cupitt
53b43e0497 fix setting of iterations in magicksave
ImageMagick uses 0 to mean unset, so we must always add 1. See
coders/gif.c.

See https://github.com/libvips/libvips/issues/1302
2019-04-29 08:43:39 +01:00
John Cupitt
b100f5a025 start revising composite again
we can get ugly sparkles in transparent areas in some cases ... start
reworking some modes

see https://github.com/libvips/libvips/issues/1301
2019-04-29 07:43:14 +01:00
John Cupitt
efadb5dc42 fix thumbnail shrink-on-load
we had the alignment check in the wrong place
2019-04-27 22:33:20 +01:00
John Cupitt
120c3b62d9 more cmyk jpg tweaks
passes tes_formats.sh now
2019-04-27 13:27:18 +01:00
John Cupitt
5d907bdd17 final update for 8.8.0-rc1 2019-04-27 11:41:26 +01:00
John Cupitt
536c76f966 Merge branch 'master' into improve-cmyk-jpg 2019-04-27 11:02:26 +01:00
John Cupitt
4132623024 add test for PNG interlace handling
see https://github.com/libvips/libvips/pull/1296
2019-04-27 09:34:49 +01:00
John Cupitt
ce8aff8dd8
Merge pull request #1296 from lovell/png-interlace-handling-ordering
master: fix interlaced PNG input handling with newer libpng versions
2019-04-27 09:16:50 +01:00
Lovell Fuller
aff0c4cde5 Ensure png_set_interlace_handling before png_read_update_info 2019-04-26 22:29:16 +01:00
John Cupitt
3245dd301b Merge branch 'master' into szi-associated 2019-04-25 17:25:32 +01:00
John Cupitt
4a9db0e83f fix animated webp background handling
We were using WEBP_FF_BACKGROUND_COLOR as the background colour, but
that's not correct, it should always be zero (transparent).
WEBP_FF_BACKGROUND_COLOR is there just as a hint when flattening down to
plain RGB.
2019-04-24 18:18:21 +01:00
John Cupitt
0102a10b49 seems to work 2019-04-24 17:04:31 +01:00
John Cupitt
0df3f0268c Merge branch 'master' into revise-thumbnail 2019-04-24 16:11:25 +01:00
John Cupitt
bb22f66453 oop remove git markup 2019-04-24 16:11:08 +01:00
John Cupitt
b5b7e75b66
Merge pull request #1294 from kleisauke/cpp-const-char
Change 'char *' to 'const char *' in the C++ binding
2019-04-24 15:27:05 +01:00
Kleis Auke Wolthuizen
8ac6574560 Change 'char *' to 'const char *' in the C++ binding
+ some documentation improvements.
2019-04-24 16:02:52 +02:00
John Cupitt
8b71d0179c Merge branch 'master' into revise-thumbnail 2019-04-23 20:27:30 +01:00
John Cupitt
d2a9a20a78 fix thumbnail regression with cmyk in and out
56d98f3ef0 broke cmyk->cymk thumbnails
2019-04-23 17:09:20 +01:00
John Cupitt
56d98f3ef0 thumbnail no longer needs to import cmyk
since colourspace knows about cmyk now
2019-04-23 11:35:13 +01:00
John Cupitt
12bc5fbbe3 revise set_stacksize() once more
so we g_info() if we change it
2019-04-23 10:12:08 +01:00
John Cupitt
76aca0370f revise set_stacksize() again 2019-04-23 10:01:35 +01:00
John Cupitt
90e1b1cc49
Merge pull request #1293 from abdollar/fix_stack_size
fixes set_stacksize which broke during merge
2019-04-22 17:29:19 +01:00
Abdul Chaudhry
c6b9015799
fixes set_stacksize 2019-04-22 09:09:05 -07:00
John Cupitt
27aae32ff6 oops 2019-04-22 11:34:45 +01:00