Commit Graph

6272 Commits

Author SHA1 Message Date
John Cupitt 4b5b982711 merge 8.8 2019-08-31 12:29:50 +01:00
John Cupitt 574be4380e revert sharpen restoring the input colourspace
icc_export can make _RGB images, so the input can be outside the set of
supported colourspace transforms.

See 46212e92b1 (r34904985)

bump version too.
2019-08-31 11:29:36 +01:00
John Cupitt 23a1636015 fix build with no IM
we had a stray ImageInfo
2019-08-30 12:20:12 +01:00
John Cupitt 5d19bcf955 Merge branch '8.8' 2019-08-30 11:03:24 +01:00
John Cupitt 6ea76f9632 improve data_length handling in jpg load
libjpeg uses unsigned ints for data length, so we must use size_t
everywhere.
2019-08-30 11:00:25 +01:00
John Cupitt 57d1d86885 avoid a harmless out of bounds read
in UCS table building
2019-08-29 15:42:05 +01:00
John Cupitt f135a6e292 add corpus for Coding verification 2019-08-29 15:30:49 +01:00
John Cupitt 349e76bb85 Merge branch '8.8' 2019-08-29 15:30:20 +01:00
John Cupitt 3161de3b52 verify bands/format for coded vips images
WHen loading a vips image with Coding set, make sure that Bands and
BandFmt are correct.
2019-08-29 15:28:55 +01:00
John Cupitt f8bdc00866 void /0 in Yxy2XYZ
Now sets 0 rather than inf.
2019-08-29 14:20:30 +01:00
John Cupitt 9a5dca1ef8 Merge branch '8.8' 2019-08-28 10:05:12 +01:00
John Cupitt 46212e92b1 fix default sharpen
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
2019-08-28 09:16:40 +01:00
John Cupitt c1e46c53b5 clarify docs for pdfload
Expand note on @background for pdfload.

See https://github.com/libvips/libvips/issues/1412
2019-08-28 06:47:48 +01:00
John Cupitt e129d85330 Merge branch '8.8' 2019-08-27 18:05:58 +01:00
John Cupitt 378537121f revise thumbnail preshrink again 2019-08-27 18:00:26 +01:00
John Cupitt 2f6cc1fad9 Merge branch '8.8' 2019-08-27 14:49:42 +01:00
John Cupitt d61a85f6c9 prevent over-pre-shrink in thumbnail
We could pre-shrink so much that an axis went to 0.

See https://github.com/lovell/sharp/issues/1782#issuecomment-525249430
2019-08-27 14:47:36 +01:00
John Cupitt 6fafbce81a add test case for out of bounds gif frame 2019-08-27 14:10:57 +01:00
John Cupitt 74156198d2 Merge branch '8.8' 2019-08-27 14:09:56 +01:00
John Cupitt 32e944349d check frame bounds for gif load
giflib does not check this either :(
2019-08-27 14:08:12 +01:00
John Cupitt d2ab993931 Merge branch '8.8' 2019-08-27 13:06:27 +01:00
John Cupitt 848df69a9c better enum validation in vips load 2019-08-27 13:05:58 +01:00
John Cupitt 5cce83a294 check image bounds for GIF load
It seems giflib does no checking of image dimensions at all, not even
height == 0.
2019-08-27 13:04:28 +01:00
John Cupitt 077fdf158e Merge branch '8.8' 2019-08-27 12:52:10 +01:00
John Cupitt ce684dd008 fetch map after DGifGetImageDesc()
Earlier refactoring broke GIF map fetch.
2019-08-27 12:50:52 +01:00
John Cupitt 0895d120d8 better enum validation in vips load 2019-08-27 10:49:37 +01:00
John Cupitt 3e89944bf9 remove a pointless optimisation from rad2float
Some old rad code could cause a read beyond end of buffer.
2019-08-27 09:23:16 +01:00
John Cupitt c8ff970476 make jpeg buffer free safer
possible race in free
2019-08-27 09:14:59 +01:00
John Cupitt f6cc2a9055 revise gifload delays array handling
so pages and delay_length can't get out of sync, even with corrupt GIFs
2019-08-26 11:35:26 +01:00
John Cupitt 3aed554fdb Merge branch '8.8' 2019-08-26 11:09:53 +01:00
John Cupitt 25e4577361 relax GIF parse rules again
lots of GIFs are very badly structured :(
2019-08-26 10:54:45 +01:00
John Cupitt 5749d60425 add a test case for /0 in exif read 2019-08-25 11:31:21 +01:00
John Cupitt 8c1377ebff Merge branch '8.8' 2019-08-25 11:30:14 +01:00
John Cupitt db6e6a0076 catch /0 in exif read 2019-08-25 11:29:37 +01:00
John Cupitt c7b402c0d6 Merge branch '8.8' 2019-08-24 18:51:11 +01:00
John Cupitt 6c525e144b handle eof better for buffer GIF
Add the new eof handling to the memory reader.
2019-08-24 18:49:56 +01:00
John Cupitt 9941490d9e add fuzz file for gif loop 2019-08-24 17:24:59 +01:00
John Cupitt 0dda54b1b5 merge 2019-08-24 17:17:45 +01:00
John Cupitt 691b5584d4 Merge branch '8.8' 2019-08-24 17:16:48 +01:00
John Cupitt 1ac96313cc note change in gifload.c 2019-08-24 17:16:28 +01:00
John Cupitt 23d0d5603d Merge branch '8.8' 2019-08-24 17:15:45 +01:00
John Cupitt 4691260540 better feof() handling in gif load
Relaxing the read error rules made looping possible .. make sure we
always stop explicitly on eof.
2019-08-24 17:14:10 +01:00
John Cupitt 77de39320a Merge branch '8.8' 2019-08-24 11:21:48 +01:00
John Cupitt 038409093f clip coding and interpretation on image read
They could be out of bounds enums. This used not to matter, but we use
them more now, so out of bounds values can cause coredumps.
2019-08-24 11:20:45 +01:00
John Cupitt 1b57c6d066 Merge branch '8.8' 2019-08-23 15:43:12 +01:00
John Cupitt 4b677fb16a make GIF parse less strict
Some GIFs don't follow the standard very closely. Let them through.

See https://github.com/libvips/libvips/issues/1404
2019-08-23 15:40:48 +01:00
John Cupitt 54ce3513fd add some corpus ascii files
some sample images for the file loader
2019-08-23 12:50:33 +01:00
John Cupitt 1de458556a try adding a file fuzzer
oss-fuzz normally fuzzes with memory buffers, but a lot of the libvips
loadres, especially CSV and PPM, only work from the filesystem.

This fuzzer writes the oss-fuzz buffer to the FS, then fuzzes that.
2019-08-23 12:43:59 +01:00
John Cupitt 81c92242d8 relax HEIC threshold
libheic versions change rounding behaviour
2019-08-21 17:42:25 +01:00
John Cupitt 19a80e4efb Merge branch '8.8' 2019-08-21 17:37:16 +01:00