Lovell Fuller
7eba4ee43f
Introduce support for target_clones attribute ( #3280 )
...
This requires GLIBC 2.23+, plus either gcc 6+ or clang 14+.
- Provides build-time feature detection
- Use with (un)premultiply for ~10% perf gain on AVX CPUs
- Slightly increases binary size, so best to use sparingly
2023-01-16 10:45:37 +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
Kleis Auke Wolthuizen
0337c09700
Cleanup gettext handling ( #2695 )
...
Use GLib's i18n support instead of copying and pasting that
logic into its own header. This deprecates the vips/intl.h
header in favour of glib/gi18n.h.
2022-02-27 15:27:28 +00:00
John Cupitt
0623a05f48
remove vips_recip()
...
it wasn't really necessary, and it was rather slow
2021-03-05 20:19:05 +00:00
John Cupitt
0407c365d1
better again
2021-02-27 20:47:29 +00:00
John Cupitt
d3ccadf212
revise unpremultiply, again
...
We were not detecting division by zero carefully enough, nor clipping
the alpha range sufficiently in unpremultiply.
see https://github.com/libvips/libvips/issues/1941
also see https://github.com/libvips/libvips/pull/1675 for another
difficult test case
2021-02-27 15:16:25 +00:00
John Cupitt
dbae22ab58
revise unpremultiply
...
We were clipping alpha very aggressively. With over- and under-shoot
ringing on edges, this could introduce extra fringes.
see https://github.com/libvips/libvips/pull/1675
2020-06-08 18:47:28 +01:00
John Cupitt
712157cd16
better support for TIFFs with many alphas
...
The premultiplied alpha can be in any position, and it checks if there
is more than one ASSOCALPHA.
See https://github.com/libvips/libvips/issues/1471
2019-11-18 16:48:34 +00:00
John Cupitt
f472df4444
block /0 in unpremultiply
2019-08-04 14:01:42 +01:00
John Cupitt
bb81113312
add credits
2017-11-24 22:12:41 +00:00
Lovell Fuller
7e23a140c4
~10% speedup by matching clipped alpha type with IN/OUT
...
Improves unpremultiply precision for float/double input
2017-11-24 19:20:29 +00:00
Alistair Thomas
5bad0404c2
Update GObject annotations for libvips/conversion directory
2017-09-26 17:04:17 +01:00
John Cupitt
362c7efdfc
argh reapply seq removal
2017-03-06 11:55:38 +00:00
John Cupitt
e6b20cbd0f
Revert "remove stalling"
...
This reverts commit 959f412380
.
2017-02-27 10:26:32 +00:00
John Cupitt
959f412380
remove stalling
2017-02-21 15:03:15 +00:00
John Cupitt
dbbd2850a1
better max_alpha default
...
it used to default to 255, now it sniff the interpretation and defaults to
65535 for RGB16 and GREY16
see https://github.com/jcupitt/libvips/issues/449
2016-05-23 12:18:39 +01:00
John Cupitt
1654ac7e5b
fix a comment
2016-05-16 14:32:52 +01:00
John Cupitt
1ae92bb15f
make optional args into bullets
...
make docs easier to read
2016-05-02 10:12:37 +01:00
John Cupitt
e69da1952d
fix a typo
...
thank you mayoung
see https://github.com/jcupitt/libvips/issues/382
2016-02-11 18:56:55 +00:00
John Cupitt
07a1903390
use g_assert_not_reached()
...
we were using g_assert(0) ... g_assert_not_reached() makes the
intention clearer
2016-01-24 13:21:53 +00:00
John Cupitt
ec52d1b922
change vips_flatten() alpha rules
...
now match vips_premultiply()
add tests
foreign knows about new logic
2015-05-09 12:10:42 +01:00
John Cupitt
9dda68f8cd
final polish
2015-05-09 10:21:31 +01:00
John Cupitt
05acd06661
fix up docs
2015-05-09 10:15:11 +01:00
John Cupitt
472bf7dbc3
add vips_unpremultiply()
2015-05-08 10:26:23 +01:00