Commit Graph

172 Commits

Author SHA1 Message Date
John Cupitt
2575d963bd add jp2k tests
and buffer load/save
2021-03-20 12:16:10 +00:00
John Cupitt
8d6f90c060 Merge branch '8.10' 2021-03-14 11:03:40 +00:00
Kleis Auke Wolthuizen
62b0939c4b vips2webp: force low duration frames to 100ms 2021-03-13 22:04:37 +01:00
John Cupitt
f74d6c795d Merge branch 'master' into add-libnsgif 2021-03-07 14:37:14 +00:00
John Cupitt
2e56828053 Merge branch '8.10' 2021-03-06 11:47:02 +00:00
John Cupitt
48d9c5d0d4 update test suite for new gif loader 2021-02-28 13:50:04 +00:00
John Cupitt
0b74acf7ba add a test for unpremultiply
we actually test vipsthumbnail --linear on an RGBA image, which should
catch everything, hopefully
2021-02-27 15:48:02 +00:00
John Cupitt
679665b403 fix a memleak in vips__correl
and some more tests
2021-02-06 15:42:31 +00:00
John Cupitt
6782769d8c add some more mosaicing tests
to try to pin down the memleak
2021-02-05 17:14:48 +00:00
Lovell Fuller
3ad7363104 heifsave: add option to control subsample_mode
Defaults to no subsampling when Q>90 for consistency with jpegsave.

Deprecate VipsForeignJpegSubsample enum, replace with more generic
VipsForeignSubsample.
2021-01-13 10:01:34 +00:00
Kleis Auke Wolthuizen
ae55fd9523 Regenerate AVIF test image with libheif v1.10.0
Saves a few bytes since the software version comment is no longer included in the hdlr box.
2021-01-06 12:14:22 +01:00
Kleis Auke Wolthuizen
030bf91815 Save AVIF test image with speed=0
Reduces the size of the image by 6 kB.
2021-01-06 12:14:21 +01:00
Kleis Auke Wolthuizen
6e72b75efa Adapt test suite for AVIF support 2021-01-06 12:14:21 +01:00
John Cupitt
42af1cec36 add vipsload_source
plus small openslideload_source fixes
2020-12-31 19:47:36 +00:00
John Cupitt
233609368b add a test for openslideload_source 2020-12-30 18:01:54 +00:00
John Cupitt
158e9e153a add some more ppm tests 2020-12-26 18:35:11 +00:00
Lovell Fuller
45fd740130 webpload: prevent divide-by-zero when blending pixels
Adds a test case to prevent regression - see commit 6eaf1ed
2020-12-17 20:23:06 +00:00
John Cupitt
3996f3279b fix range clips for casts to and from int
Fix two bugs:

- clip in casts from int32 and uint32 could overflow -- do these as gint64 now

- clip in casts from float to int could overflow since float32 can't
  represent the full range of int32 without losing precision -- do these
  as double

And add some more tests.

Thanks ewelot.

see https://github.com/libvips/libvips/issues/1922
2020-12-09 15:14:59 +00:00
Kleis Auke Wolthuizen
ea53660a6b Port Ruby test case to Python 2020-11-23 14:40:59 +01:00
John Cupitt
6894159ad5 fix icc-profiles and dzsave --no-strip
We were not copying metadata down pyramid layers in dzsave, so
--no-strip didn't allow icc profiles on tiles.

Thanks altert

See https://github.com/libvips/libvips/issues/1879
2020-11-11 10:02:46 +00:00
John Cupitt
39899582d4 add tests for tiff pyr save region-shrink flag
we were testing the flag before, but not that the result was correct

see https://github.com/libvips/libvips/issues/1875
2020-11-03 23:44:11 +00: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
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
Lovell Fuller
69ee8a32b6 Ensure SVG loader skips input with chars outside x09-x7F range
Add test with example valid WebP image that happens to contain
the string '<svg' within its compressed image data.
2020-08-21 11:38:40 +01:00
John Cupitt
0803de07e7 move vips__lr|tbmerge to private API 2020-07-01 17:31:25 +01:00
John Cupitt
e3a500204a
Merge pull request #1593 from kleisauke/disable-deprecated
Fix for --disable-deprecated (#1273)
2020-06-28 11:07:56 +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
Kleis Auke Wolthuizen
541e58610b Add unit test for vips_mosaic / vips_globalbalance 2020-06-18 14:42:55 +02:00
Kleis Auke Wolthuizen
4b5db786f0 Add unit test for vips_matrixinvert 2020-06-18 14:41:03 +02:00
Kleis Auke Wolthuizen
8abcae3abc Avoid using vips7 symbols 2020-06-18 14:21:43 +02:00
John Cupitt
b7a285e84b remove f"" from test suite to help older pythons 2020-06-18 10:10:39 +01:00
John Cupitt
19077b53ac revise tiff2vips 1/2/4 bit load
simpler, faster, smaller
2020-06-17 13:59:02 +01:00
John Cupitt
99d7573ab6 add tests for 2 and 4 bit tiff 2020-06-16 21:49:07 +01:00
John Cupitt
c307d3686f add some more thumbnail tests 2020-06-15 14:06:16 +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
30386db775
Merge pull request #1650 from wix-playground/master
Handle mirrored orientations in autorot
2020-06-06 14:46:15 +01:00
John Cupitt
6d5a371147 add some tests for subifd pyramids
fix a problem with jpg-compressed tiffs too
2020-06-02 18:08:34 +01:00
elad laufer
c993a7ad2a - use jpeg in test target 2020-05-13 11:12:01 +03:00
Elad Laufer
b05cf39df8
Handle mirroring in autorot (#8)
* handle mirroring in autorot
* added tests for autorot
2020-05-12 13:01:48 +03:00
John Cupitt
c2094fcd7c relax thresh for jpegload
some lib jpegs have slightly different rounding behaviour
2020-04-24 19:26:17 +01:00
elad laufer
8749871c71 - remove no_subsample from inner calls 2020-02-18 18:04:29 +02:00
elad laufer
22b3a0d161 - use enum string 2020-02-18 13:43:02 +02:00
elad laufer
838b5e7458 - add test case 2020-02-18 11:33:29 +02:00
elad laufer
65b1a3eac2 - add test case 2020-02-18 11:09:18 +02:00
elad laufer
494d8876eb - don't skimp on names 2020-02-17 17:15:43 +02:00
elad laufer
d2b794ec35 - use a single enum and switch that replaces no_subsample, force_subsample 2020-02-17 11:29:57 +02:00
elad laufer
c626c9de14 add force subsample argument that overrides the Q deduced subsampling directive 2020-02-16 18:37:32 +02: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
34fcd1fe69 fix autorot in thumbnail
`vips_thumbnail()` was not taking a private copy of the image before
modifying metadata during auto-rotate.

Thanks janko.

See https://github.com/libvips/libvips/issues/1523
2020-01-12 14:24:23 +00:00
John Cupitt
2e9d89b6d4 enable connection tests now pyvips is updated
pyvips should now support connections, so always enable the tests
2020-01-12 14:15:23 +00:00
Andrii Dmytrenko
d0b69826cc Reset orientation if exif data is incorrect 2020-01-06 11:02:10 +00:00
John Cupitt
119dd2cb72 pytest passes again after stream -> source/target 2019-12-29 23:08:33 +00:00
John Cupitt
664796acab relax text test render threshold
so we pass on win as well, see 981ffe752b (r36581177)
2019-12-26 14:11:15 +00:00
John Cupitt
981ffe752b add test for text autofit 2019-12-21 05:38:39 +00:00
John Cupitt
1e2ca2e0bf fix refleak in webpsave_buffer
And add teardown to the test-suite so we can spot refleaks more easily.
2019-12-21 05:13:54 +00:00
John Cupitt
6c038f5ca8 add a test for tuncated image files 2019-12-18 14:48:59 +00:00
John Cupitt
e236f19f97 add fallbacks to new_from_stream
If the stream-based loaders fail, vips_image_new_from_stream() now falls
back to the old file and buffer loaders.

The file and buffer loaders already try the stream loaders first.
2019-12-10 17:19:12 +00:00
John Cupitt
a50405c1f7 fix some run-time errors from clang
Travis is now running with some amount of run-time checking enabled and
it spotted a couple of harmless things.
2019-12-05 14:14:27 +00:00
John Cupitt
ae7aaea077 doc polish 2019-12-01 15:29:28 +00:00
John Cupitt
686829166d fix some more metadata updates
some more minor cases picked up by the test suite
2019-11-30 12:11:23 +00:00
John Cupitt
5c7a649001 fix test suite for metadata changes
added a few more .copy() calls
2019-11-28 15:59:09 +00:00
John Cupitt
002b2a28e1 fix test suite
for the new jpg sample image
2019-11-27 11:48:50 +00:00
John Cupitt
d00573b26a remove utf-8 filename example
too tricky to make it work on both py27 and py37
2019-11-26 09:07:10 +00:00
John Cupitt
2eebcb0c07 update tests for streami renames 2019-11-25 18:39:50 +00:00
Kleis Auke Wolthuizen
41c08b0ffb Add svgload_stream to the descriptors test
Seems to work!
2019-11-10 12:32:18 +01:00
John Cupitt
cefa82bacf bump version for pyvips stream test 2019-11-07 20:58:10 +00:00
John Cupitt
4804e5c299 add some basic stream tests
Only tests load and save to and from files and memory. We should test
pipes too.
2019-11-07 17:35:49 +00:00
John Cupitt
3d344b4b5f add Kleis's patches
and add minimise support to radiance load
2019-11-06 17:04:13 +00:00
John Cupitt
6c1d7db31b remove old jpeg load stuff
it's just stream now

works on buffer, but seems to fail on

	vipsheader йцук.jpg

curiously
2019-10-11 09:43:12 +01:00
John Cupitt
1ee54bfa80 Merge branch '8.8' 2019-09-05 12:45:08 +01:00
John Cupitt
f80c7a1810 add tests for xres/yres in tiffsave 2019-09-05 12:39:56 +01:00
John Cupitt
81c92242d8 relax HEIC threshold
libheic versions change rounding behaviour
2019-08-21 17:42:25 +01:00
John Cupitt
8f28fa625e restore switch/case test
now that relational const is fixed up
2019-08-21 16:51:01 +01:00
John Cupitt
fd25f13a2d add a test for the fix 2019-08-21 16:47:13 +01:00
John Cupitt
0b3ece5b42 new constants code now passes all tests 2019-08-21 16:36:18 +01:00
John Cupitt
d70c431961 relax HEIC threshold
argh rounding with different lib versions
2019-08-19 16:44:32 +01:00
John Cupitt
2d0c21279a add tests 2019-08-19 16:27:44 +01:00
John Cupitt
cdee0feb93 Merge branch '8.8' 2019-08-09 10:12:55 +01:00
John Cupitt
d2d63f4ac4 revise profile_load
seems to work!
2019-08-08 13:23:28 +01:00
John Cupitt
def0e73449 Merge branch '8.8' 2019-08-07 20:29:37 +01:00
John Cupitt
675c150500 fix build with IM7 2019-08-07 20:29:19 +01:00
John Cupitt
7250b169d4 Merge branch '8.8' 2019-08-07 16:19:23 +01:00
John Cupitt
f36927e78d fix build against graphicsmagick
- add tests for more features missing in GM
- simplify the IM/GM configure tests
- revise the test suite to pass with GM and IM
2019-08-07 16:17:27 +01:00
Oscar Mira
e14a9b9221 add small images suitable for fuzzing 2019-08-06 12:29:34 +02:00
John Cupitt
9dc422cb21 relax testsuite for magicksave
it seems some magicks code gif-loop differently
2019-07-06 20:44:24 +01:00
John Cupitt
c8ca8f02ba keep magicksave delay array alive for longer
fixes a segv in magicksave_buffer ... we could try to use delay after im
had been unreffed in some circumstances
2019-07-06 17:45:41 +01:00
John Cupitt
25af46a189 add rgba -> rgb stage for webp output 2019-06-30 16:53:11 +01:00
John Cupitt
72c103f95a Revert "remove no-alpha webp support"
This reverts commit d1094847a3.
2019-06-27 17:27:53 +01:00
John Cupitt
d1094847a3 remove no-alpha webp support
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
2019-06-27 16:37:11 +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
ec0b7e7bdf fix pdf test
for new sizing rules
2019-04-30 16:24:36 +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
e14ae48a67 fix heifsave on ubuntu 18.04 2019-03-14 13:33:11 +00:00
John Cupitt
3010a4a865 remove autorotate from libheif
not possible to support this properly with current libheif
2019-03-05 17:26:08 +00:00
John Cupitt
f209870e7b start trying to fix autorotate for heif images 2019-03-05 15:35:58 +00:00
John Cupitt
cae57d5670 make heif load/save work with 1.3.2 2019-02-20 12:30:12 +00:00
John Cupitt
1a83605238 Merge branch 'add-heifload' 2019-02-17 17:11:14 +00:00
John Cupitt
06d71f6df3 raise magicksave threshold 2019-02-07 18:51:57 +00:00
John Cupitt
931b661d2b fix up and test with im6/im7/gm
seems to work! phew
2019-02-07 18:35:51 +00:00