Commit Graph

22 Commits

Author SHA1 Message Date
John Cupitt cdcafbc4c5 add changelog notes
and linewrap for 80 column limit
2022-05-07 12:51:58 +01:00
Kleis Auke Wolthuizen 894ed1cb13
Resize improvements; add `ceil` and `gap` options (#1769)
* Add a round-up option to shrink

* Only leave the final 200% to reduce

* Add gap option to reduce and resize

* Add unit tests

* Incorporate feedback
2022-05-07 12:45:38 +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 e1baf66f19 "squash" to tiffsave now does lab as well
The "squash" option to tiffsave now also squashes 32-bit 3-band float
CIELAB images down to 8 bits.

See https://github.com/libvips/libvips/issues/1499
2019-12-18 17:29:34 +00:00
John Cupitt 5ddc154a81 prevent int overflow for int pixels in shrinkh
by using double for an accumulator
2019-08-06 17:00:53 +01:00
Alistair Thomas c24d36fc79 Update GObject introspection annotations for libvips/resample directory 2017-09-30 17:26:55 +01:00
John Cupitt 362c7efdfc argh reapply seq removal 2017-03-06 11:55:38 +00:00
John Cupitt 55840cf131 try setting a seq meta
and only caching in shrinkv if we see the tag
2017-03-05 21:59:01 +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 b140c18a37 various tweaks to calm coverity
passes cleanly now
2017-01-20 08:55:13 +00:00
John Cupitt 271d8656e9 use round() rather than rint() where appropriate
rint() rounds to nearest even, rather than nearest ... in some cases,
like geometry transforms, we want strict nearest
2016-08-20 12:59:41 +01:00
John Cupitt 1f403a4add first attempt
seems to all work, test it a bit more

see https://github.com/jcupitt/libvips/issues/491
2016-08-15 15:45:26 +01:00
John Cupitt e8b5cb6c23 add VIPS_COUNT_PIXELS, overcomputation tracking
added VIPS_COUNT_PIXELS(), use like this:

	static int vips_shrinkh_gen( VipsRegion *or, ... )
	{
        	VIPS_COUNT_PIXELS( or, "vips_shrinkh_gen" );
	}

and on image close, if more than 100% of the pixels have been
calculated, you get a warning

only if you enable debugging, since this hurts perf slightly
2016-03-22 12:26:45 +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 9b968491d3 unroll shrinkh inner loop
use VIPS_UNROLL for the inner loop, another 5% or so
2016-01-22 10:21:38 +00:00
John Cupitt dce70c82a5 vectorise vips_shrinkh()
add special paths for 1, 3 and 4 bands so we can vectorise

see https://github.com/jcupitt/libvips/pull/369
2016-01-22 09:49:20 +00:00
John Cupitt 2e5880b69c speed up for vips_shrinkh()
remove the sum buffer, we can just use a local, about 5% faster

see https://github.com/jcupitt/libvips/pull/369
2016-01-22 09:15:38 +00:00
Lovell Fuller 572354b793 Allow compiler to vectorise vips_shrinkh
Reduce for-loop count in shrinkh macros
Don't access loop variable outside loop
Remove unnecessary use of ceil from integer
2016-01-21 20:18:56 +00:00
John Cupitt 11ce13d43d enable new shrink code
2x faster, much lower memuse
2015-10-31 12:15:48 +00:00
John Cupitt 582a7f1810 shrink2 now done
big mem saving, still a bit slower though
2015-10-31 10:43:08 +00:00
John Cupitt da8f236f95 try a split shrink
not quite done yet
2015-10-30 18:15:14 +00:00