Commit Graph

8041 Commits

Author SHA1 Message Date
John Cupitt
75bd19759f Merge branch '8.13' 2022-09-20 10:04:22 +01:00
John Cupitt
907d17cd06 revise caching of seq mode loaders
We were not caching seq mode loaders used in random access mode.

see https://github.com/libvips/libvips/issues/3044
2022-09-20 10:03:00 +01:00
Kleis Auke Wolthuizen
6d43755bfa
convi/reducev: initialize the sum with the addition (#3052)
* reducev: initialize the sum with the addition

Avoids an Orc opcode.

* convi: initialize the sum with the addition

Avoids an Orc opcode.

* vector: add comments to magic numbers
2022-09-17 14:18:15 +01:00
Kleis Auke Wolthuizen
d874010d09
convi/reducev: use convsuswb in Orc path (#3053)
* reducev: use convsuswb in Orc path

Saves a few instructions.

* convi: use convsuswb in Orc path

Saves a few instructions.
2022-09-17 12:26:00 +01:00
John Cupitt
3b33d912c4 fix an undefined shift 2022-09-15 12:57:36 +01:00
John Cupitt
d2e7d036ae improve HEIF is_a
- fix sign issue with some chunk sizes
- allow larger chunk_len

See https://github.com/libvips/libvips/discussions/3048
2022-09-14 16:56:37 +01:00
Kleis Auke Wolthuizen
6bf1422548
jxlsave: sync quality to distance calculation with libjxl (#3050)
Ensures the quality to distance conversion is continuous at 30.

See:
ea5fa8074d
2022-09-14 13:40:40 +01:00
Ruven
4985fec6b4
Inverted order of TIFF tag writing when saving multi-page subifd pyramids (#3047)
* Inverted order of TIFF tag writing when saving multi-page subifd pyramids to ensure that subifd pyramid layers are correctly tagged as reduced-image subfile type and not as pages

* Use if-else clause to avoid tag overwriting
2022-09-13 17:56:42 +01:00
John Cupitt
3081821636 revert dhint check
We added a check that loader ->header() and ->load() methods set the
same dhint. This commit removes that check -- it's not possible to make
header and load match in all cases since images can take so many routes,
and can change between the two events.

If we see performance issues around inappropriate cache sizing again,
try to fix just those cases.
2022-09-12 10:38:17 +01:00
John Cupitt
63f1673beb note buffer print fix 2022-09-11 14:30:09 +01:00
John Cupitt
0b3ab3a934 fix null string in buffer print
Some libvips header fields can be NULL, for example filename, and we
need to avoid null pointer deref on print.

See https://github.com/libvips/libvips/issues/3043
2022-09-11 14:29:12 +01:00
John Cupitt
e37487ca2f fix null string in buffer print
Some libvips header fields can be NULL, for example filename, and we
need to avoid null pointer deref on print.

See https://github.com/libvips/libvips/issues/3043
2022-09-11 14:26:53 +01:00
John Cupitt
a2b1847cbd Merge branch 'master' of github.com:libvips/libvips 2022-09-11 14:09:19 +01:00
John Cupitt
bc0c910091 note dangerous bit of meson.build 2022-09-11 13:41:36 +01:00
Lovell Fuller
c9de7b2b15
tiff2vips: ensure stdint.h in included for uint32_t (#3040) 2022-09-11 13:41:30 +01:00
John Cupitt
81dc91927d fix ci build
adding the examples/ if/endif broke the sed that's used to remove extra
subdirs in ci
2022-09-11 11:36:33 +01:00
John Cupitt
d836166087 add some more examples 2022-09-09 10:14:59 +01:00
Sergey Alexandrovich
ce31c04cd2
nsgifload: choose tile-height based on page height (#2996) 2022-09-08 19:05:42 +01:00
John Cupitt
1bd618546b fix vips_init in example 2022-09-08 17:05:10 +01:00
John Cupitt
bce598cc35 Merge branch 'master' of github.com:libvips/libvips 2022-09-08 16:26:19 +01:00
John Cupitt
873c90710a add examples/ dir
plus one example
2022-09-08 16:25:33 +01:00
Luca Corbo
aef5c6b3e6
readme: meson build flags - fix small typo (#3034) 2022-09-08 14:51:47 +01:00
Daniel Löbl
2d9c50735f
webpsave: switch to sink_disc (#3018)
* webpsave: switch to sink_disc

* fix some warnings

* distinguish between animated and single image write

* fix some formatting issues

* add missing comments

* fix webpsave_mime

* don't use sink_disc for single image webp write

* fix potential segv/double free

* update changelog

* remove leftover function declaration

* Revert "don't use sink_disc for single image webp write"

This reverts commit a75922ca93ee8987fa5e1ffc52b68e22bd6fb1fb.

* implement review feedback

* adjust to a column size of 80

* get contiguous RGB(A) buffer directly from VipsRegion

* Revert "get contiguous RGB(A) buffer directly from VipsRegion"

This reverts commit 84fc10e52fb223f0208c605dde92d3f821ceee0e.

* accumulate image data directly in frame_bytes buffer

* switch WebP back to Webp naming scheme

* rename page_index to page_number

* revise formatting
2022-09-08 14:32:13 +01:00
John Cupitt
a36d382519 oop debug left on 2022-09-08 10:21:19 +01:00
John Cupitt
c0e91d139d revise cgifsave to save mem
a bit simpler too

copying dloebl's idea from https://github.com/libvips/libvips/pull/3018
2022-09-08 10:16:50 +01:00
John Cupitt
5d1e26255d Merge branch '8.13' 2022-09-08 09:14:01 +01:00
John Cupitt
0e7c7a9a13 note palette save fix 2022-09-08 09:12:27 +01:00
Lovell Fuller
b58b7bd416
pngsave: ensure 8-bit palette images can be created (#3031) 2022-09-08 09:10:02 +01:00
John Cupitt
3191e5cea5 revise cgif save loop 2022-09-07 12:10:20 +01:00
John Cupitt
91986a9778 revise cgif save loop 2022-09-07 11:10:02 +01:00
John Cupitt
45f5a1867d fix changelog layout 2022-09-05 10:18:13 +01:00
John Cupitt
fc01771454 fix changelog layout 2022-09-05 10:02:27 +01:00
John Cupitt
2912787f9d version bump for 8.13.2 2022-09-05 10:01:37 +01:00
John Cupitt
5afc4a2df5 Merge branch '8.13' 2022-09-05 09:59:25 +01:00
Kleis Auke Wolthuizen
e87c828aa5
dzsave: add missing include directive for errno/EEXIST (#3025)
Resolves: #3024.
2022-09-05 09:58:52 +01:00
John Cupitt
702ed8298f check for blocked operations on cache lookup
We could return an operation from cache even after the operatuion had
been blocked. This was harmless, but could cause confusion.

see https://github.com/kleisauke/wasm-vips/pull/24
2022-09-04 16:35:00 +01:00
John Cupitt
078ac059b7 update spngload for new header test 2022-09-03 22:42:41 +01:00
Kleis Auke Wolthuizen
867a09737c
CI: remove redundant glib-utils dependency (#3022)
The GLib utilities, which was split into its own `glib-utils`
formula has been merged back into `glib`, see:
https://github.com/Homebrew/homebrew-core/pull/108307

This reverts commit a846de017d.
2022-09-03 15:45:49 +01:00
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