John Cupitt
19009b15a9
revise loader demand hints
...
Add a check that header and load methods agree on the demand hint, and
make sure all loaders pass.
If they disagree, you can get bad performance in some cases, since the
pipeline can be built from the header dhint.
2022-09-03 15:31:37 +01:00
John Cupitt
a7e754162a
move tiff decompress outside lock ( #2969 )
...
* move tiff decompress outside lock
Most time in TIFF read is spent in decompression. If we move this
outside the lock, we can get a useful speedup.
This commit adds the machinery to move the lock to before decompress, so
jp2k decompression is now threaded.
Before:
```
$ vips copy wtc.jpg x.tif[tile,compression=jp2k]
$ time vips avg x.tif
117.249845
real 0m15.085s
user 0m16.155s
sys 0m0.109s
```
After:
```
$ time vips avg x.tif
117.249845
real 0m1.207s
user 0m18.384s
sys 0m0.369s
```
* start moving jpg decode outside the lock
* move jpeg decompress outside the lock
seems to work
* add some more tile size checks
double-check jpeg tile size before decode
* fix tiffload demand hinting
We were not setting the hint correctly in header load, and we were not
hinting smalltile for tiled TIFFs.
2022-09-03 13:10:58 +01:00
John Cupitt
9486110abb
Merge branch '8.13'
2022-08-30 17:11:51 +01:00
Kleis Auke Wolthuizen
a19f326d19
dzsave: improve compatibility with libgsf < 1.14.29 ( #3017 )
...
* Implement `GsfOutfileStdio` by ourselves
* Add missing `->root` init
* Fix styling
* Update ChangeLog
2022-08-30 17:10:38 +01:00
John Cupitt
6a154ac9f2
add ".pnm" save
...
see https://github.com/libvips/libvips/issues/3016
2022-08-30 12:31:47 +01:00
John Cupitt
2e5e9fb755
set "magick-format" for IM7 load
...
see https://github.com/libvips/libvips/discussions/3011
2022-08-26 16:01:15 +01:00
John Cupitt
4a85214c0e
set magick-format
...
see https://github.com/libvips/libvips/discussions/3011
2022-08-26 15:53:01 +01:00
John Cupitt
f4cd55ddf5
tweak popperload tile size
...
to make it big enough for an A4 page at 300dpi
2022-08-26 13:14:44 +01:00
Anton
f4a3c7eb54
Mention mozjpeg as the best libjpeg option ( #2995 )
2022-08-19 12:22:43 +01:00
Akash Hiremath
eb632c1f9b
Updated README.md to add Vix, Elixir lang bindings ( #2991 )
2022-08-15 18:42:40 +01:00
John Cupitt
794d8d03a1
Merge branch 'master' of github.com:libvips/libvips
2022-08-15 12:16:40 +01:00
John Cupitt
4df80b2e49
note GIF addition
...
see https://github.com/libvips/libvips/pull/2984
2022-08-15 12:16:07 +01:00
Daniel Löbl
0b70145d99
cgifsave: add support for interlaced GIF write ( #2984 )
...
* cgifsave: add support for interlaced GIF write
note: cgif >= v0.3.0 is required
* switch to warning instead of error
* add test
* fix test
2022-08-15 12:14:02 +01:00
John Cupitt
0029b3c416
require libjxl 0.7+
2022-08-14 17:32:40 +01:00
John Cupitt
332d3a9093
Merge branch '8.13'
2022-08-14 17:28:26 +01:00
John Cupitt
e88db2ceb4
fix jxl load rewind
...
Looks like there's no way to reset the decoder state, so we have to
remake it.
2022-08-14 17:27:13 +01:00
John Cupitt
99e6bb833e
ooops
2022-08-14 16:29:00 +01:00
Kleis Auke Wolthuizen
f36196db1b
jxlsave: avoid using deprecated functions ( #2989 )
...
* jxlsave: avoid using deprecated functions
The upcoming libjxl 0.7 has deprecated a number of functions.
* Prefer to use `ifdef` instead
2022-08-14 15:54:21 +01:00
Kleis Auke Wolthuizen
34427d83a0
jxlsave: correctly mark frame as last ( #2988 )
...
It's required to close the input, otherwise the encoder can't
know what the last frame is, resulting in an improper codestream.
Resolves : #2987 .
2022-08-14 15:53:33 +01:00
John Cupitt
b4bfaeb980
Merge branch '8.13'
2022-08-14 12:16:10 +01:00
John Cupitt
1989203985
fix low bitdepth PNG save of high bitdepth images
...
SOme combinations of high bitdepth images with low bitdepth PNG save could
produce incorrect images, for example saving a 16-bit fourier image as 1-bit.
2022-08-14 12:14:55 +01:00
John Cupitt
94d3f93a46
add another low bitdepth png save test
2022-08-14 11:05:09 +01:00
John Cupitt
aa109f102d
Merge branch '8.13'
2022-08-14 10:31:09 +01:00
John Cupitt
ca2796aa7f
fix low-bitdepth spng save
...
There was a missing shift, thanks jeffska
See https://github.com/libvips/libvips/issues/2985
2022-08-14 10:26:24 +01:00
John Cupitt
c0637d9969
jp2ksave saves as jp2
...
Confusingly we previously saved jp2 images as a jpeg2000 codestream rather
than as a jp2 file.
See https://github.com/libvips/libvips/issues/2977
2022-08-11 16:49:40 +01:00
Felix Bünemann
c6214b4d47
Remove even pixel check for J2K subsample_mode auto ( #2975 )
...
Having a different colorspace and chroma subsampling just because the
source image happens to be an even or odd number of pixels is surprising
and hard to debug, so let's remove it.
2022-08-11 16:02:03 +01:00
John Cupitt
a928c9a885
a little more dbg output in heifsave
2022-08-11 10:30:23 +01:00
John Cupitt
d27dfbe55d
revise help text for loaders
...
Hopefully to make it clearer and more consistent.
See https://github.com/libvips/libvips/discussions/2982
2022-08-10 12:50:53 +01:00
John Cupitt
29e80ca43f
better 0 detection in unpremultiply
...
We were avoiding /0 by testing for alpha==0, however, this will still
allow very small values of alpha to generate +/- Inf. Instead, check for
abs(alpha)<epsilon.
Fixes some artifacts after unpremul.
2022-08-08 16:16:10 +01:00
John Cupitt
1482753c90
revise meson cheatsheet
2022-08-08 15:57:11 +01:00
John Cupitt
0f56b099d0
remove dbg
2022-08-05 09:14:28 +01:00
John Cupitt
34c17fc3e8
don't minimise after sink_screen expose
...
We were minimising at the end of threadpool_run, but this was being
called for each sinkscreen render pass, so we were throwing away the
display cache.
Instead, minimise after sink, sink_memory and sink_disc.
2022-08-05 09:12:13 +01:00
John Cupitt
7e961b4671
Merge branch '8.13'
2022-08-02 14:22:27 +01:00
Kleis Auke Wolthuizen
f43f7844a7
convf: bake the scale into the mask ( #2974 )
...
Similar to the vector path of vips_convi.
2022-08-02 14:21:07 +01:00
John Cupitt
2c4c039056
add "unlimited" to jpegload
...
To disable DoS limits for JPEG loading. Adding API on a stable branch is
bad, but this fixes a regression, so I think it's necessary,
unfortunately.
See https://github.com/libvips/libvips/issues/2973
2022-08-02 13:50:09 +01:00
Kleis Auke Wolthuizen
a6fa62605c
Cherry-pick a couple of Meson improvements to 8.13 ( #2968 )
...
* add a summary table at the end of configure
Copied from the old autotools summary. Sample clipped from "meson setup":
```
Program python3 found: YES (/usr/bin/python3)
Configuring variables.sh using configuration
Message:
*Build options
enable debug ......................: true
enable deprecated .................: true
enable modules ....................: true
enable gtk-doc ....................: true
enable doxygen ....................: false
enable introspection ..............: true
enable RAD load/save ..............: true
enable Analyze7 load/save .........: true
enable PPM load/save ..............: true
enable GIF load ...................: true
*Optional external packages
use fftw for FFTs .................: true
accelerate loops with ORC .........: true
ICC profile support with lcms .....: true
zlib ..............................: true
text rendering with pangocairo ....: true
font file support with fontcongfig : true
EXIF metadata support with libexif : true
*External image format libraries
JPEG load/save with libjpeg .......: true
JXL load/save with libjxl .........: false
JPEG2000 load/save with openjpeg ..: true
PNG load/save with libspng ........: false
PNG load/save with libpng .........: true
selected quantisation package .....: imagequant
TIFF load/save with libtiff .......: true
image pyramid save with libgsf ....: true
HEIC/AVIF load/save with libheif ..: true
WebP load/save with libwebp .......: true
PDF load with PDFium ..............: false
PDF load with poppler-glib ........: true
SVG load with librsvg .............: true
EXR load/save with openexr ........: true
OpenSlide load ....................: true
Matlab load with libmatio .........: true
NIfTI load/save with niftiio ......: true
FITS load/save with cfitsio .......: true
GIF save with cgif ................: true
selected Magick package ...........: MagickCore
Magick load/save ..................: true
Build targets in project: 53
...
```
* Meson: improve summary table (#2943 )
* Meson: improve summary table
* Fix typo
* Remove redundant whitespace
* Fix libpng fall-back when build with `-Dspng=disabled` (#2955 )
* Meson: simplify dynamic module handling (#2956 )
* Deduplicate `--vips-config` with the build summary (#2957 )
* Deduplicate `--vips-config` with the build summary
* Ensure output is identical
Helps parses.
* Fix summary when build with `-Dnifti=disabled` (#2963 )
* Update ChangeLog
Co-authored-by: John Cupitt <jcupitt@gmail.com>
2022-07-31 10:09:00 +01:00
Kleis Auke Wolthuizen
df80ded468
Fix summary when build with -Dnifti=disabled
( #2963 )
2022-07-30 19:23:51 +01:00
Kleis Auke Wolthuizen
4d5622c217
Simplify VIPS_CONFIG
definition ( #2964 )
2022-07-30 19:23:09 +01:00
Kleis Auke Wolthuizen
99f239b4a6
CI: remove redundant JOBS env ( #2967 )
...
ninja runs as many parallel jobs as there are available CPU cores
by default. So, there's no need to set this environment variable.
2022-07-30 19:22:42 +01:00
Kleis Auke Wolthuizen
3f95543c2c
Allow to modify/create EXIF GPS* tags ( #2966 )
...
* Allow to modify/create EXIF GPS* tags
Make `tag_is_ascii` aware of the EXIF GPS* ASCII tags that are
available since libexif 0.6.23.
See: https://github.com/lovell/sharp/issues/2767
* Add tests
2022-07-30 19:21:54 +01:00
John Cupitt
8c71424e9a
version bump
...
and changelog update
2022-07-30 12:37:30 +01:00
John Cupitt
d17fd9b640
fix matlab block test
2022-07-30 12:36:56 +01:00
Kleis Auke Wolthuizen
cf97ea3ea1
Deduplicate --vips-config
with the build summary ( #2957 )
...
* Deduplicate `--vips-config` with the build summary
* Ensure output is identical
Helps parses.
2022-07-29 11:09:51 +01:00
Kleis Auke Wolthuizen
f132acf94a
doc: remove non-existent headers ( #2962 )
...
These pre-generated headers were removed in commit 0577039
.
2022-07-29 11:08:44 +01:00
Kleis Auke Wolthuizen
a24b556b26
Meson: simplify dynamic module handling ( #2956 )
2022-07-28 15:10:13 +01:00
Kleis Auke Wolthuizen
45bcd74a7a
Fix libpng fall-back when build with -Dspng=disabled
( #2955 )
2022-07-28 14:37:12 +01:00
Kleis Auke Wolthuizen
673a593161
test: remove TestIofuncs::test_split7
( #2954 )
...
See: https://github.com/libvips/pyvips/pull/341
2022-07-28 12:37:35 +01:00
Kleis Auke Wolthuizen
1679115432
Regenerate POTFILES.in ( #2951 )
2022-07-27 13:34:20 +01:00
John Cupitt
d17fa04a5d
AUTHORS can go too
2022-07-27 11:24:24 +01:00
John Cupitt
8b1679e138
NEWS is no longer needed
2022-07-27 11:23:20 +01:00