John Cupitt
406e228c9b
vips_resize() is always centre convention
...
it was corner for downsize, but should be centre to match imagemagick
2017-11-26 15:24:40 +00:00
John Cupitt
ee4186ae8f
revise resize docs
2017-11-25 15:13:20 +00:00
John Cupitt
7db13412e5
deprecate centre option to resize
...
it's now centre on upsize, corner on downsize
see https://github.com/jcupitt/libvips/issues/705
2017-11-25 14:22:20 +00:00
John Cupitt
cb128eb258
apply --centre to upsize as well as down
...
we were just using the --centre flag in resize to influence downsize
behaviour -- use it to set upsize as well
see https://github.com/jcupitt/libvips/issues/705
2017-11-25 12:09:01 +00:00
John Cupitt
68ed42e2fa
make linear and cubic adaptive
2017-10-15 22:09:44 +01:00
John Cupitt
cf1e6e3ef8
oh dear, missing breaks in switch
...
too much ruby sigh
2017-10-13 12:16:03 +01:00
John Cupitt
de82c9e919
allow much larger reduce factors
...
sometimes you want to use lanczos etc. for everything
2017-10-09 11:48:11 +01:00
Lovell Fuller
ea6d496484
Upsample integral nearest neighour with zoom for accuracy.
...
This mirrors logic from sharp, allowing it to migrate to resize.
See https://github.com/lovell/sharp/issues/752
2017-10-03 19:44:34 +01:00
Alistair Thomas
c24d36fc79
Update GObject introspection annotations for libvips/resample directory
2017-09-30 17:26:55 +01:00
John Cupitt
0a5375b6cd
Merge branch 'master' into remove-seq-stalling
2017-03-15 12:26:44 +00:00
John Cupitt
d7da3c7de7
fix vips_resize() bug
...
if hscale and vscale were very different, resize could fail with "reduce
factor too large" ... just a silly typo
2017-03-10 10:22:40 +00: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
20f99b62cf
more ideas
2017-03-05 21:59:01 +00:00
John Cupitt
2be0b97dce
switch to g_warning()_/g_info()
...
we had vips_warn() and vips_info(), but they are a bit crappy ... switch
to g_warning() and g_info() instead
see https://github.com/jcupitt/libvips/issues/544
2017-01-03 15:52:27 +00:00
John Cupitt
d3cafb3a9f
seems to work
...
add @centre option for downsampling, see
https://github.com/jcupitt/libvips/issues/504
2016-09-10 10:31:33 +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
65105a9442
upsize with something other than nearest
...
vips_resize() uses to just use nearest when upsizing, following standard
practice in repro. This is often unfortunate for image processing, where
small nearest upsizes will produce obvious aliasing.
It now picks a VipsInterpolate which corresponds (roughly) to the
selected VipsKernel and uses that with affine for any upsizing.
2016-06-22 10:33:08 +01:00
John Cupitt
f3326c8126
better vips_resize() for cubic/linear/nearest
...
vips_resize() used to do most of a downsize with vips_shrink() and the
final 200 - 300% with vips_reduce(). This was correct for lanczos2/3,
but not right for linear/cubic, which need more shrink and less
reduce to avoid aliasing.
This patch makes vips_resize() leave the final 100 - 200% to
vips_reduce() for linear/cubic, and leave everything to reduce for
nearest.
2016-06-16 09:46:02 +01:00
John Cupitt
948d1103d4
note more webp tests needed
2016-05-07 19:53:00 +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
02821ae9e3
expose @kernel setting for vips_resize()
...
a new optional arg lets you pick the downsizing kernel
2016-05-01 12:33:49 +01:00
John Cupitt
c2d1de9a26
allow mixed zoom and shrink in resize
...
vips_resize() now allows >1 on one axis, <1 on the other ... previously,
although you could have non-square ratios, you couldn't mix zoom and
shrink
2016-05-01 12:03:13 +01:00
John Cupitt
36e0b60ffa
put the resize cache back again
...
stops overcomputation on vips_shrink()
2016-03-22 14:35:44 +00:00
John Cupitt
46a18118c6
works!
2016-03-15 16:46:18 +00:00
John Cupitt
ff88087a28
try making the reduce mask larger with residual
2016-03-15 14:59:59 +00:00
John Cupitt
45c3fea6ac
more resize tuning
2016-03-15 09:49:30 +00:00
John Cupitt
ac4e5ce059
return of shrink-less-affine-more
...
though a bit less extreme
2016-03-14 14:58:02 +00:00
John Cupitt
fba2ac2f85
fix sizing issues with new reduce code
...
a couple of bugs and some changed conventions
2016-03-13 17:44:24 +00:00
John Cupitt
f12fef4aa9
fix compile
2016-03-13 11:35:35 +00:00
John Cupitt
70db9aa77b
better rounding in resize
2016-03-12 13:14:34 +00:00
John Cupitt
493482c8a7
hey ho, line cache goes back too
2016-03-11 14:56:06 +00:00
John Cupitt
08e8c27e38
moore vips_resize() tuning
...
put back the mild post-shrink sharpen, a little more anti-alias
see https://github.com/jcupitt/libvips/issues/404#issuecomment-195297607
2016-03-11 10:17:41 +00:00
John Cupitt
5d31d8e824
turn up anti-alias for small shrinks
...
a little more anti-alias for small reductions
see https://github.com/jcupitt/libvips/issues/404#issuecomment-195276154
2016-03-11 09:25:33 +00:00
John Cupitt
2ca7b29214
better gauss mat generation
2016-03-10 22:01:55 +00:00
John Cupitt
4974a1ed9c
better rounding for vips_resize()
...
we were getting off by one size errors
2016-03-10 19:53:05 +00:00
John Cupitt
d351e07a6b
finish up
2016-03-10 17:33:34 +00:00
John Cupitt
ad7ddc4f24
more vips_resize() tuning
...
now we have better tuning for the anti-alias blur, we can increase the
amount we shrink by and reduce the amount we affine by
this gives a noticable speedup
2016-03-01 11:19:30 +00:00
John Cupitt
67f3ecfd8d
wire up to resize / similarity
...
still need tests
2016-01-29 15:23:00 +00:00
John Cupitt
3bb24f2567
some tinkering
...
still not very quick
2016-01-28 09:33:32 +00:00
John Cupitt
1f93efd65d
fix more compiler warnings
2016-01-26 16:41:03 +00:00
John Cupitt
a7d889df06
use builtin floor / ceil
...
get rid of FAST_PSEUDO_FLOOR, add VIPS_FLOOR and VIPS_CEIL, use them
everywhere
see https://github.com/jcupitt/libvips/pull/372
2016-01-23 09:50:57 +00:00
John Cupitt
2620f3b8c9
allow non-square vips_resize()
...
in a very crude way
2015-11-19 17:09:18 +00:00
John Cupitt
8506ff13a6
try to improve vips_resize() quality
...
small improvements to vips_resize() quality:
* turn down the anti-alias filter a little so we don't smudge out texture
* don't do the final sharpening pass if we skipped the anti-alias filter
* fix a >/>= mixup which meant we didn't sharpen for small resizes
2015-11-19 15:22:23 +00:00
John Cupitt
4c51f5b36d
tune cache sizes a bit more
2015-11-11 13:00:25 +00:00
John Cupitt
d94a2807c9
smarter cache sizing for vips_resize
...
see comment in code, should now account for max delay possible
2015-11-11 10:23:50 +00:00
John Cupitt
a345a517c1
add docs note
...
note that when resizing, xres/yres need to be updated by the application
2015-02-25 08:47:45 +00:00
Lovell Fuller
8fbe8c36fa
Resize builder uses 7 temp images
...
Prevents memory leak and possible segfault
2015-01-22 13:27:52 +00:00
John Cupitt
d9709119fa
oop, leak in vips_resize()
...
see https://github.com/jcupitt/libvips/issues/217
2015-01-21 13:17:39 +00:00
John Cupitt
0eca68a088
fix vips_resize() C API
...
oops, see https://github.com/jcupitt/libvips/issues/223
2015-01-21 09:05:36 +00:00