John Cupitt
979422886b
revise tiff load/save doc comments
2020-01-29 18:26:16 +00:00
John Cupitt
81fa983121
oop, dropped an "else"
2020-01-29 18:12:37 +00:00
John Cupitt
a158b15b97
add LOGLUV TIFF support
...
libvips XYZ images load and save as libtiff LOGLUV
see https://github.com/libvips/libvips/issues/1506
2020-01-29 17:47:08 +00:00
John Cupitt
2e3eca7e29
another missing copy operation
...
The --page-height arg to savers needs a copy as well.
2020-01-29 15:44:55 +00:00
John Cupitt
165a3a3855
Merge branch '8.9'
2020-01-28 13:36:46 +00:00
John Cupitt
42930e8d87
add "depth" param to tiffsave
...
Add a "depth" param to tiffsave to set pyramid depth, just like the
"depth" param on dzsave.
See https://github.com/libvips/libvips/issues/1485
2020-01-26 18:39:47 +00:00
John Cupitt
f8c7f9dac9
interpret \ as an escape char in break_token
...
So:
vips_break_token( "hello\ world", " " )
Sees a single token, `"hello world"`.
This means you can now do things like:
$ vips arrayjoin "k\ 2.jpg" x.png
Where "k 2.jpg" is a filename containing a space.
See https://github.com/libvips/libvips/issues/1493
2020-01-26 13:59:04 +00:00
John Cupitt
c14d7c254b
add max and min to region_shrink
...
Add max and min to region_shrink. Useful with tiffsave and dzsave when
the image is (for example) line art. Thanks rgluskin.
See: https://github.com/libvips/libvips/issues/1490
2020-01-24 17:55:11 +00:00
John Cupitt
df6ff62cde
add @id arg to dzsave
...
So you can now set the base of the id property in info.json in IIIF
output. Thanks regisrob.
See https://github.com/libvips/libvips/issues/1531
2020-01-24 17:12:46 +00:00
John Cupitt
767c87d6e6
better iiif json
...
Change "scalefactor" to "scaleFactor", thanks regisrob.
See https://github.com/libvips/libvips/issues/1530
2020-01-24 16:28:52 +00:00
John Cupitt
53407206cf
start 8.10 cycle
2020-01-24 16:26:28 +00:00
John Cupitt
fda5e5c402
lock for metadata changes
...
Another attempt at fixing crashes on metadata chenage in highly threaded
applications.
Global lock around set, remove and copy metadata. This is crude, but
simple, the performance impact should be small, and ought to resolve the
problem.
We'll do something better for the next version.
see https://github.com/lovell/sharp/issues/1986
2020-01-21 08:29:59 +00:00
John Cupitt
eebc6e5636
remove some dead code
2020-01-21 08:27:17 +00:00
John Cupitt
fc9edfe593
improve imagemagick init
...
graphicsmagick, in some configurations, needs to be told to init the
various loaders.
Thanks @LebronCurry
See https://github.com/libvips/libvips/issues/1528
2020-01-15 14:42:58 +00:00
John Cupitt
6605029bc3
revise svg detection
...
We weren't checking svgz files as far in.
2020-01-15 09:01:38 +00:00
John Cupitt
a762601564
revise jpegsave auto no-chroma
...
IM actually uses Q >= 90, not > 90, to disable chroma subsampling.
Adjust libvips to match.
Thanks @csnover
2020-01-15 08:32:08 +00:00
John Cupitt
8752a76e66
fix a race in tiled tiffload and pdfload
...
We weer minimising sources in the ::minimise handler, but this is called
outside the lock that protects _generate. This patch removes minimise in
this case.
See https://github.com/kleisauke/net-vips/issues/53
2020-01-14 18:06:12 +00:00
John Cupitt
70e8c6a61f
revise vipsthumbnail tutorial
...
Some of the args have changed slightly.
2020-01-14 17:10:31 +00:00
John Cupitt
285f6c7418
add casts for tiff seek
...
To make our meaning clearer.
libtiff uses uint64 for toff_t, with -1 cast to uint64 for an error
indication, see:
https://gitlab.com/libtiff/libtiff/blob/master/libtiff/tif_unix.c#L123
See also:
https://github.com/kleisauke/net-vips/issues/53
2020-01-14 14:50:46 +00:00
John Cupitt
8c1c8b6c9f
fix a warning from magicksave on some platforms
...
we were leaving delay_gvalue as {0} then unsetting it, which will
produce a warning with some versions of glib.
Thanks chregu.
See https://github.com/libvips/libvips/issues/1524
2020-01-13 16:23:58 +00: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
John Cupitt
3862b636e4
remove some dbg code
...
accidentally left in, thanks Kleis
2020-01-10 05:03:48 +00:00
John Cupitt
51fc2ff64e
don't use new source API for new_from_file etc.
...
We were attempting to load images in new_from_file using the new source
API first, then only falling back to the file loaders if that failed.
However, this meant that we did not respect the priority ordering on
loaders, so openslide iamges (for example) were being loaded by the tiff
loader.
2020-01-09 14:47:14 +00:00
John Cupitt
1338def535
fix some autorot issues
...
and a problem with vipsthumbnail of tif
see https://github.com/libvips/libvips/issues/1515
2020-01-07 09:00:14 +00:00
John Cupitt
5b09845bd5
don't set page-height in thumbnail unless we must
...
We were always setting page-height in thumbnail, even on single-frame
images. This could cause problems if the image height was later
increased by a factor of the height -- non-animated images could
accidentally turn into animated images.
https://github.com/libvips/libvips/issues/1469
2020-01-06 17:04:01 +00:00
John Cupitt
0cdf00a9ba
remove stray declaration of vips_mapimage()
...
We declared vips_mapimage() in histogram.h. This became
vips_case() later in development, but this old decl was left behind in
error.
Thanks @remicollet
See https://github.com/libvips/libvips/issues/1513
2020-01-06 15:06:33 +00:00
John Cupitt
c583e5ebc9
missing copy in autorot
...
autorot was missing a copy, causing a warning about metadata removal in
a shared image.
Thanks chregu
See https://github.com/libvips/libvips/issues/1515
2020-01-06 14:22:58 +00:00
John Cupitt
7732bf9981
Merge pull request #1514 from fetlife/use-default-orientation-value-if-orientation-is-incorrect
...
Reset orientation if exif data is incorrect
2020-01-06 11:41:48 +00:00
Andrii Dmytrenko
9609f4f1d7
Check if orientation is less than 1
2020-01-06 11:30:27 +00:00
Andrii Dmytrenko
d0b69826cc
Reset orientation if exif data is incorrect
2020-01-06 11:02:10 +00:00
John Cupitt
5ee0623182
revise doc comment for resample
...
We can now do high-quality reduce for any scale factor, though it'll be
slow for very large reductions.
Thanks homm, see https://github.com/libvips/pyvips/issues/148
2020-01-03 08:59:50 +00:00
John Cupitt
ecb22cdecc
free png write on end of write, not image dispose
...
We were freeing the PNG write struct on image dispose, not at the end of
write.
Thanks homm. See https://github.com/libvips/pyvips/issues/147
2020-01-02 15:51:42 +00:00
John Cupitt
3b2c77dd35
free shrinkv resources earlier
...
Free the shrinkv line buffer and struct at the end of eval, not on image
dispose. This helps keep mem use down in some long-running operations.
Thank you homm, see https://github.com/libvips/pyvips/issues/147
2020-01-02 15:32:43 +00:00
John Cupitt
be3775e868
fix up i18n
...
POTFILES etc. needed updating for the recent class renames.
2020-01-01 18:24:13 +00:00
John Cupitt
b2334d8d62
Merge branch 'rename-stream'
2020-01-01 12:06:22 +00:00
Kleis Auke Wolthuizen
31bf0e3cb7
Update function list for stream -> source rename
2020-01-01 12:28:18 +01:00
John Cupitt
95444d0849
rename stuff in the C++ API for stream -> source
2019-12-30 17:49:41 +00:00
John Cupitt
4169e1a0fd
Merge pull request #1510 from ledeuns/patch-1
...
Fix crash on backward memcpy()
2019-12-30 17:40:55 +00:00
Denis Fondras
837ca2e044
Fix crash on backward memcpy()
...
In some environment, building fails because of backward memcpy().
2019-12-30 18:29:36 +01:00
John Cupitt
3847f71c54
rename bufis as well
2019-12-30 16:57:19 +00:00
John Cupitt
96cdc5ef01
revise docs for source / target
2019-12-30 16:28:39 +00:00
John Cupitt
63d54e5df2
final code cleanups after stream -> source rename
2019-12-30 14:23:51 +00: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
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