Commit Graph

305 Commits

Author SHA1 Message Date
John Cupitt c2094fcd7c relax thresh for jpegload
some lib jpegs have slightly different rounding behaviour
2020-04-24 19:26:17 +01:00
John Cupitt b689235f57 missing include in test_connections
Thanks brcarp.

See https://github.com/libvips/libvips/issues/1571
2020-03-11 09:11:29 +00: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
Kleis Auke Wolthuizen 31bf0e3cb7 Update function list for stream -> source rename 2020-01-01 12:28:18 +01:00
John Cupitt 252996e3ff make check passes after stream -> source rename 2019-12-30 12:48:20 +00:00
John Cupitt 119dd2cb72 pytest passes again after stream -> source/target 2019-12-29 23:08:33 +00:00
John Cupitt 4c5873809f experiment with renaming stream
rename as VipsConnection, VipsSource, VipsTarget etc.

see https://github.com/libvips/libvips/issues/1494#issuecomment-569498619

renamed with this script:

```

set -e

edit() {
        sed -i -E "$1" rename
}

for i in $*; do
        cp $i rename

        edit s/VIPS_STREAMOU/VIPS_TARGET_CUSTOM/g
        edit s/VIPS_STREAMO/VIPS_TARGET/g
        edit s/VIPS_STREAMIU/VIPS_SOURCE_CUSTOM/g
        edit s/VIPS_STREAMI/VIPS_SOURCE/g
        edit s/VIPS_STREAM/VIPS_CONNECTION/g

        edit s/vips_streamou/vips_target_custom/g
        edit s/vips_streamo/vips_target/g
        edit s/vips_streamiu/vips_source_custom/g
        edit s/vips_streami/vips_source/g
        edit s/vips_stream/vips_connection/g

        edit s/VipsStreamou/VipsTargetCustom/g
        edit s/VipsStreamo/VipsTarget/g
        edit s/VipsStreamiu/VipsSourceCustom/g
        edit s/VipsStreami/VipsSource/g
        edit s/VipsStream/VipsConnection/g

        # eg. VIPS_TYPE_STREAM or VIPS_IS_STREAM
        edit "s/VIPS_([A-Z]+)_STREAMOU/VIPS_\1_TARGET_CUSTOM/g"
        edit "s/VIPS_([A-Z]+)_STREAMO/VIPS_\1_TARGET/g"
        edit "s/VIPS_([A-Z]+)_STREAMIU/VIPS_\1_SOURCE_CUSTOM/g"
        edit "s/VIPS_([A-Z]+)_STREAMI/VIPS_\1_SOURCE/g"
        edit "s/VIPS_([A-Z]+)_STREAM/VIPS_\1_CONNECTION/g"

        edit s/streamou/target_custom/g
        edit s/streamo/target/g
        edit s/streamiu/source_custom/g
        edit s/streami/source/g

        # various identifiers which also change
        edit s/is_a_stream/is_a_source/g
        edit s/find_load_stream/find_load_source/g
        edit s/find_save_stream/find_save_target/g
        edit s/new_from_stream/new_from_source/g
        edit s/write_to_stream/write_to_target/g
        edit s/vips_thumbnail_stream/vips_thumbnail_source/g

        # eg. vips_webpload_stream
        edit "s/vips_([a-z]+)load_stream/vips_\1load_source/g"

        # eg. vips_webpsave_stream
        edit "s/vips_([a-z]+)save_stream/vips_\1save_target/g"

        mv rename $i
done
```
2019-12-29 21:40:21 +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 f43d6c4cf7 add note in test_desc about ppm loader
and why we can't test_destriptots on that
2019-12-23 14:58:22 +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 e1baf66f19 "squash" to tiffsave now does lab as well
The "squash" option to tiffsave now also squashes 32-bit 3-band float
CIELAB images down to 8 bits.

See https://github.com/libvips/libvips/issues/1499
2019-12-18 17:29:34 +00:00
John Cupitt 6c038f5ca8 add a test for tuncated image files 2019-12-18 14:48:59 +00:00
John Cupitt 6b02c22457 add a test with VIPS_STALL
stresses the caching and locality systems
2019-12-18 14:41:35 +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 163b0165d7
Merge pull request #1483 from libvips/check-metadata-changes
block metadata changes on shared images
2019-11-30 17:37:20 +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
Kleis Auke Wolthuizen 2499b38403 Update C++ binding and function list
The generators use the new Introspect class of pyvips.
2019-11-29 14:51:03 +01: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 1a2a4a41f1 remove dbg code now travis is fixed 2019-11-27 22:20:33 +00:00
John Cupitt b08bfede5f try fixing the stream test on travis 2019-11-27 17:30:13 +00:00
John Cupitt 002b2a28e1 fix test suite
for the new jpg sample image
2019-11-27 11:48:50 +00:00
John Cupitt 48f675db45 update jpg name in variables.sh.in as well 2019-11-27 08:58:30 +00:00
John Cupitt ec41c42a3a revise test_cli for new sample jpg 2019-11-26 09:14:40 +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
John Cupitt 99f535c57a add streams.c test
tests VipsStream*u, at a basic level at least.
2019-11-24 18:22:43 +00:00
John Cupitt 562da3e5ab rename new_from_filename as new_from_file
So VipsStreami matches VipsImage. Same for new_to_filename.
2019-11-22 17:13:20 +00:00
John Cupitt 55024c71ce
Merge branch 'master' into add-stream-object 2019-11-12 14:08:02 +00:00
John Cupitt ceb2db513d Merge branch '8.8' 2019-11-11 18:05:57 +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 cbbd4ae6dd seems to work!
just a bit more cleaning up needed ...
2019-10-27 18:19:43 +00:00
John Cupitt c7582c79d2 remove lib wrapper from repo 2019-10-24 04:33:04 +01:00
John Cupitt 696ff2b24a fix up jpeg load
and revise descriptor test
2019-10-17 13:16:12 +01:00
John Cupitt c01c3b9100 add minimise support to VipsStreamInput 2019-10-14 10:46:17 +01:00