John Cupitt
06b52da52a
update ChangeLog for stream rename
2019-12-29 21:48:14 +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
c65e399c48
win32 patches
...
see https://github.com/libvips/libvips/issues/1494#issuecomment-569495472
2019-12-29 12:19:58 +00:00
John Cupitt
9c6bfc7462
better error handling in vips__seek
...
Now that we are using the poxis API on win32, we don't need to check
GetLastError()
2019-12-28 12:54:44 +00:00
John Cupitt
32d3ba2a50
fix vips__ftruncate
...
We'd forgotton to update this for the new vips__seek return.
See https://github.com/libvips/libvips/issues/1494#issuecomment-569413267
2019-12-28 12:47:50 +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
d89df1661a
revise doc comments in bufis
2019-12-26 12:25:19 +00:00
John Cupitt
e43cba116a
swap recursion for iteration in skip_whitespace
...
and avoid a stack overflow, see
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19701
2019-12-26 11:22:33 +00:00
John Cupitt
f2f2ab200d
revise webpload for improved loader pattern
2019-12-24 13:49:53 +00:00
John Cupitt
5e35827a41
revise tiffload to match the new loader pattern
...
should be simpler and safer
2019-12-24 09:55:08 +00:00
John Cupitt
96079202ef
rework jpegload class
...
to match the radload pattern
2019-12-24 09:21:22 +00:00
John Cupitt
561f410f0a
rework pngload
...
To match the new radload pattern.
2019-12-24 07:55:06 +00:00
John Cupitt
548aa30414
remove stray debg code
2019-12-23 17:24:09 +00:00
John Cupitt
861f6d1ef4
radload was not setting priority correctly
...
We used to have separate subclasses for file, buffer and stream load,
but only set ->priority in one of them.
Rework radload as a base class plus a set of implementations.
2019-12-23 17:22: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
0c217efdf3
fix compiler warning
2019-12-22 15:04:07 +00:00
John Cupitt
0429a0080e
swap ssize_t for gint64 where possible
...
Some versions of the Windows headers define ssize_t as unsigned. This
patch removes (where possible) use of ssize_t inside libvips, esp. in
the new stream API.
See https://github.com/libvips/libvips/issues/1494#issuecomment-568254731
2019-12-22 13:45:45 +00:00
John Cupitt
e48f45187b
make RGB and sRGB synonmous
...
We had a half-baked idea that RGB could mean generic RGB space and sRGB
would mean strict sRGB interpretation.
Unfortunately, this did not work well in practice. For example,
`icc_transform("srgb")` would tag the result as RGB rather than sRGB
(the converter didn't know it was writing sRGB pixels, it just saw
conversion to RGB with an ICC profile), and then later stages would do
unnecessary icc_imports, or worse, fail.
This patch makes RGB and sRGB strict synonyms. If you want to treat an
RGB image as something other than sRGB, you'll need to do it by hand
with the icc_ functions.
See
https://github.com/libvips/pyvips/issues/144
46212e92b1 (r34904985)
https://github.com/libvips/libvips/issues/1494
2019-12-22 11:40:09 +00:00
John Cupitt
b964deb482
fix SANITY checks in streami.c
...
they had bitrotted a bit
2019-12-21 14:12:59 +00:00
John Cupitt
c84a43f277
fix memleak in vips_text()
...
We were not unreffing PangoLayout. Thank you uint128!
See https://github.com/libvips/libvips/issues/1508
2019-12-21 12:56:09 +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
4b0c2924ab
fix refleak in dzsave
2019-12-21 04:46:16 +00:00
John Cupitt
9d05251f7e
revise formatting
2019-12-20 15:23:06 +00:00
John Cupitt
ff2b934244
Merge pull request #1504 from deftomat/webp-delay-fix
...
fix: do not try to use "undefined" delay during WEBP animation save
2019-12-20 15:21:01 +00:00
John Cupitt
76dd2d3910
fix profile removal
...
we had a possible shared image
2019-12-20 14:12:25 +00:00
John Cupitt
8030d7b926
fix map of custom seekable streams
...
We failed for seekable custom streams.
See https://github.com/libvips/libvips/issues/1494#issuecomment-567190830
2019-12-20 12:44:56 +00:00
John Cupitt
53dac98b55
larger seq cache
...
Make the seq cache 50% larger to allow for rounding with some image
widths, tile sizes and thread numbers.
See https://github.com/libvips/libvips/issues/1494#issuecomment-567190830
2019-12-19 15:26:10 +00:00
John Cupitt
4616cf1f5c
small changes to the gif-loop fix
...
see https://github.com/libvips/libvips/pull/1362
2019-12-18 18:09:30 +00:00
John Cupitt
501fc38130
Merge pull request #1362 from deftomat/master
...
fix: make gif-loop consistent between GIF and WEBP
2019-12-18 17:55:28 +00:00
John Cupitt
7906c128cd
better error messages on save
...
The stream savers were polluting the error log.
2019-12-18 17:50:19 +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
c0c07ea003
fix invalidate tagging
...
The new tagging system was unreffing the wrong operation.
See https://github.com/libvips/libvips/issues/1494#issuecomment-565200939
2019-12-18 14:32:30 +00:00
Tomáš Szabo
057459fd7d
fix: do not try to use "undefined" delay
...
Expression could be truthy even when no `delay` was provided by user.
Now, the `delay_length` is 0 by default to avoid this situation.
2019-12-18 15:23:57 +01:00
John Cupitt
8f95b08218
put seq access back in to tilecache
...
We removed seq mode from tilecache a few months ago as part of a
simplification, but it turns out it's needed for vips_sequential().
see https://github.com/libvips/libvips/issues/1494#issuecomment-565099645
2019-12-17 16:58:31 +00:00
Tomáš Szabo
982e323c71
docs: replace `gif-loop` with `loop`
2019-12-17 16:28:04 +01:00
Tomáš Szabo
1fde574a86
Merge branch 'master' of https://github.com/libvips/libvips
2019-12-17 07:39:14 +01:00
Tomáš Szabo
bff5e6a78d
chore: add .editorconfig
2019-12-17 07:28:40 +01:00
Tomáš Szabo
d14e0d5c97
feat: add normalized `loop` field
2019-12-17 07:28:28 +01:00
John Cupitt
45015b002a
stray DEBUG
2019-12-14 05:19:18 +00:00
John Cupitt
2f806320f3
Merge branch 'master' of github.com:libvips/libvips
2019-12-14 05:18:20 +00:00
John Cupitt
1fd3b478e1
always check memory area length
...
vips_image_new_from_memory() allowed you to use length == 0 to mean
"don't check memory length". This was part of some very old vips7
compatibility.
The ppm loader could pass length == 0 if header size was equal to file
size, bypassing the length check.
2019-12-14 05:13:44 +00:00
John Cupitt
112dc9101a
remove early shutdown from tiff reader
...
since streams do this automatically now
2019-12-13 14:19:09 +00:00
John Cupitt
6fea2e7c57
clip negatives off LABS L in tiff save
...
Negative L in LABS needs to be trimmed off before savingf as TIFF.
Thanks angelmixu.
See https://github.com/libvips/libvips/issues/1499
2019-12-13 12:45:49 +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
56090c6fa7
fix another compiler warning
2019-12-08 14:16:52 +00:00
John Cupitt
dd4b2e9c23
fix some clang warnings
2019-12-08 13:08:38 +00:00
John Cupitt
40bffa8cc6
small reformats
...
plus remove save multiband as separated multiink
2019-12-07 17:41:53 +00:00