Commit Graph

2209 Commits

Author SHA1 Message Date
Kleis Auke Wolthuizen
815b499076
Start a new changelog for 8.15 (#3283) 2023-01-16 11:46:03 +01:00
John Cupitt
dc78c2c6e4 fix jpeg autorotate for orientation 3
we were not clearing the orientation tag if width and height were
unaltered by the orientation change

see https://github.com/libvips/libvips/discussions/3268

thanks zhifengzhuang
2023-01-09 10:11:45 +00:00
John Cupitt
a52b8e3681 fix mono fits write
we should write mono images as naxis=2

see https://github.com/libvips/libvips/issues/3265
2023-01-06 12:06:12 +00:00
John Cupitt
e2c2866fc6 tweak docs, add changelog notes
and an assert for semaphore_down_timeout

see https://github.com/libvips/libvips/pull/3253
2023-01-03 12:09:24 +00:00
John Cupitt
9419b3636f add missing vips_thread_isworker compat func
also bump to 8.14.1

see https://github.com/libvips/libvips/issues/3254

thanks remi
2023-01-02 11:57:05 +00:00
John Cupitt
feae09e9cd make arrayjoin much faster with large arrays
arrayjoin was making a region on every input image during startup, and
repeating for each thread (!!) so large arrays could be very expensive
to join.

Instead, make input regions on demand, and computre set of required
input images rather than searching for them.

See https://github.com/libvips/libvips/discussions/3247
2022-12-29 20:50:22 +00:00
John Cupitt
a03e1ef75d reorder changelog items 2022-12-24 13:28:10 +00:00
John Cupitt
34df78f778 revise changelog 2022-12-22 19:02:04 +00:00
John Cupitt
ec98db2196 note release date for 8.14 2022-12-22 18:52:16 +00:00
John Cupitt
a4c1919d69 Merge branch '8.13' 2022-12-16 11:37:18 +00:00
John Cupitt
caed71af04 emit "finish" at the end of targetcustom write
In 8.13 we deprecated target_finish() (it did not have an error return)
to target_end() (now has an error return).

This PR makes target_end() also emit the "finish" signal for
compatibility with the previous API. ruby-vips, for example, looks for
on_finish() to close files.

See https://github.com/libvips/ruby-vips/issues/351

Thanks lucaskanashiro
2022-12-16 11:32:16 +00:00
John Cupitt
821e2165b9 add meson option to disable cplusplus api build 2022-12-15 11:20:10 +00:00
Daniel Löbl
6bb0b4dd1e
heifsave: make it possible to use a specific encoder (#3198)
* heifsave: make it possible to use a specific encoder

* argument label: switch to leading capital letter

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* add VipsForeignHeifEncoder enum

* correct type

* implement reviewer feedback

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
2022-12-15 11:02:38 +00:00
Kleis Auke Wolthuizen
20a4d6029d
Allow libjxl 0.6 (#3223)
This partially reverts commit 0029b3c4.
2022-12-08 13:22:36 +00:00
John Cupitt
ac4c2d2b3d
gifsave: deprecate reoptimise, add reuse (#3213)
see https://github.com/libvips/libvips/discussions/3211
2022-12-05 15:41:54 +00:00
Emanuel Jöbstl
25444cd927
Expose attention center when doing attention-based cropping. (#3164)
* ADded optional output parameter to smartcrop to track the center of
attention.

* Added unit test.

* Added docs & updated changelog.

* Updated argument labels & types in documentation.
2022-11-28 14:10:16 +00:00
John Cupitt
e3289ad2c1
add exif support to png load/save (#3168)
* start adding exif in png

the "Exif\0\0" header isn't being added and removed correctly

needs tests

* all done

tested with linpng and libspng
2022-11-18 11:57:05 +00:00
John Cupitt
e24cee4e22
WIP -- add simple bash completion support (#3131)
* add simple bash completion support

* add "completions" subdir to meson

* start extending completion to extra args

* file complete for every arg after 1

* add completion for enums, file, ints, doubles

* docs, try to improve directory completion

though dir completion is not working correctly, I'm not sure why
2022-11-13 18:57:14 +00:00
John Cupitt
7f352b3c9e
revise fitsload (#3120)
* compiles

* note changelog

and switch to FATSTRIP (much quicker)

* don't duplicate header fields in fitssave

be careful not to set records twice in save

see https://github.com/libvips/libvips/issues/3113

* tiny polish
2022-11-13 18:52:28 +00:00
John Cupitt
ef2646ef6a
add a "wrap" option to vips_text() (#3130)
see:

https://github.com/libvips/libvips/discussions/2073

https://github.com/libvips/libvips/discussions/3126
2022-11-10 15:46:46 +00:00
John Cupitt
b8a2d26ad9 Merge branch '8.13' 2022-11-09 14:53:43 +00:00
John Cupitt
27874386b2 missing include in mosaic_fuzzer
causes build fail on debian9, see https://github.com/libvips/libvips/issues/3152
2022-11-09 14:52:01 +00:00
John Cupitt
3ebb21491d improve fail-on handling for GIF load
fail-on truncated and warning now works for GIF load
2022-11-05 12:04:47 +00:00
John Cupitt
976db37f84
Revised threading system (#3105)
* reimplement threadpool

just a set of threads that get recycled

"ninja test" passes and dzsave seems to work, though pytest fails for
some reason

* clean up threading code a bit

move base stuff into thread.c, so we have a simple

	thread -> threadset -> threadpool

layering

* start trying to revert g_threadpool

based on the original commit

* working!

nice low systime again

still need to repply cnages to threadpool.c since 80e0cc3d1

* reapply fixes from master

so threadpool.c is now up to date

* rename VipsThread as VipsWorker

a bit less confusing

* use a semaphore to count workers in a pool

* tidy up

* formatting

* dynamic threadpool sizing

based on counting the number of blocked threads in each pool

it works, but the improvement is not great :(

* add "concurrency" metadata item

so operators can hint threadpool size (dzsave especially)

* don't use thinstrip for small images

* add RGB mode to openslide

since flatten was taking 20% of CPU time for dzsave

* fix up rgb mode

now actually works

* make the tile buffer per thread

in the new openslideload rgb mode

* fix dynamic pool downsize

* mild refactoring

* fix the buffer system

oops, turned it off by mistake

* all done!

* revise changelog

* Update libvips/iofuncs/threadset.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* Update libvips/iofuncs/threadset.c

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>

* LSan: add libMagickCore to suppression file

* Revert "Remove mutex lock for VipsThreadStartFn"

This reverts commit 41440491.

* add VIPS_MAX_THREADS

to set a hard limit on the threadset size

* Revert "Revert "Remove mutex lock for VipsThreadStartFn""

This reverts commit 77e8520966ba79194fff3b4e648bbd295cd5c260.

* remove sslock from sink.c

* move fixed threadpool build to init

not first use

* add some doc comments

* revert test suite threshold change

* add a test for MAX_THREADS

and move the test tmp/ area into the builddir

* limit VIPS_MAX_THREADS to sane values

* use tabs rather than spaces

Co-authored-by: Kleis Auke Wolthuizen <github@kleisauke.nl>
2022-10-26 15:25:19 +01:00
John Cupitt
eb4b21eec2 Merge branch '8.13' 2022-10-19 17:37:11 +01:00
John Cupitt
53a3e6d819 note recent changes 2022-10-19 17:36:55 +01:00
John Cupitt
2335172794 Merge branch '8.13' 2022-10-19 12:47:53 +01:00
Lovell Fuller
1fc01c05e8
exif: ensure prefix is present before parsing (#3100)
Newer Apple devices are creating EXIF without this however libexif
still requires it due to JPEG/JFIF/APP1 marker heritage.
2022-10-19 12:47:23 +01:00
John Cupitt
1297f2c6d7
add suport for N colour ICC profiles (#3046)
* seems to export to cmyk+2 correctly

We'll need something fancier for import.

* more hacking

* Revert "more hacking"

This reverts commit fcdad5b491fc4d5a1750388947e42d1e98b1d9d7.

* generalise to many colour export

Should work up to 12 colour profiles (all that lcms supports).

* support import with N-colour profiles
2022-10-19 09:19:18 +01:00
John Cupitt
f0bb3e3442 Merge branch '8.13' 2022-10-14 20:06:34 +01:00
John Cupitt
e83468e051 note spng fixes 2022-10-14 20:06:05 +01:00
John Cupitt
ab2e0bf38c Merge branch '8.13' 2022-10-11 08:49:03 +01:00
John Cupitt
fbef674625 better rules for 16-bit heifsave
now parallel 16-bit PNG save

see https://github.com/libvips/libvips/discussions/3087
2022-10-11 08:45:24 +01:00
John Cupitt
69b139dfff Merge branch '8.13' 2022-09-29 05:55:18 +01:00
Lovell Fuller
d3a1d4df1b
spngsave: name ICC profiles (#3068)
The PNG spec requires that the iCCP chunk has a profile name with
a minumum length of 1 (we use the same "icc" name as pngsave).
2022-09-28 16:28:44 +01:00
John Cupitt
5569022dbd use G_GNUC_* attribute system
Instead of our own compiler attr thing.

see https://github.com/libvips/libvips/issues/2871
2022-09-23 14:37:35 +01:00
John Cupitt
eed0e5b43c Merge branch '8.13' 2022-09-22 14:11:31 +01:00
John Cupitt
a86f33769b add changelog note 2022-09-22 14:09:55 +01:00
John Cupitt
1f8e547d99 Merge branch '8.13' 2022-09-21 19:09:44 +01:00
John Cupitt
b0be5beb30 note vips_text size check change 2022-09-21 19:09:15 +01:00
John Cupitt
c9a21a7aaa Merge branch '8.13' 2022-09-21 11:50:16 +01:00
John Cupitt
fa4b80b74b earlier quit of dzsave on kill
We were only testing "killed" once for each strip of tiles. Check on each
tile as well to make set_kill() faster.

see https://github.com/kleisauke/net-vips/issues/179
2022-09-21 11:48:48 +01:00
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
John Cupitt
63f1673beb note buffer print fix 2022-09-11 14:30:09 +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
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
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