Commit Graph

90 Commits

Author SHA1 Message Date
John Cupitt
99f02aeff1 allow approx gaussmat
works with gaussblur now
2017-10-16 17:10:16 +01:00
John Cupitt
9e0ff87dd5 add docs for autofit_dpi 2017-10-10 13:10:17 +01:00
John Cupitt
40f20e5e0a Merge branch 'master' into gargsms-text-autofit 2017-10-10 13:04:31 +01:00
Alistair Thomas
103452c3ee Correct typo in comment for out parameter of inverlut() and remove some trailing whitespace 2017-10-02 21:28:46 +01:00
Alistair Thomas
0563330b43 Update GObject introspection annotations for libvips/create directory 2017-09-30 20:47:39 +01:00
John Cupitt
393e2cd766 typo 2017-09-21 10:58:30 +01:00
John Cupitt
18d25cfa08 add autofit_dpi output property 2017-09-21 10:46:17 +01:00
John Cupitt
809f523274 text autosize could overflow 2017-09-21 10:39:37 +01:00
John Cupitt
64be1d89b5 add gravity 2017-09-20 00:43:17 +01:00
John Cupitt
e07a1d83fb fix up autofit again
A bit cleaner and simpler now, stops earlier if it can.

I experimented with other ways of picking the next guess, but none were
significantly better than picking the half-way point. The problem is
that autosize can be very non-linear. Line breaks appear and disappear
as you adjust DPI and it's possible to construct cases where it never
tries the correct solution.
2017-09-19 23:02:26 +01:00
John Cupitt
06533d2c9e oop, proportion wrong 2017-09-19 13:01:12 +01:00
John Cupitt
f4151d6e5b faster, more accurate convergence for autofit
better next guess, better final choice
2017-09-19 12:56:42 +01:00
John Cupitt
3cd0d5f161 try changing dpi instead of font size 2017-09-18 23:01:38 +01:00
gargsms
3a93f2b2c2 Do not change font size if the font size is already specified 2017-09-18 18:45:28 +05:30
gargsms
a3955c6c0a Fix code convention, issues with gravity 2017-09-18 18:34:50 +05:30
gargsms
7aacf26bcb Fix autofit for good 2017-09-15 17:48:55 +05:30
gargsms
8f660ab45b [WIP] Autofit text in the requested dimensions 2017-08-01 23:26:24 +05:30
John Cupitt
5a26b8fc45 fix caching of vips_text()
it was never cached argh because the g_object_set() to set the default
value of an input param in _build changed the hah
2017-05-29 12:38:38 +01:00
John Cupitt
36761bcfd7 make vips_gaussnoise() pixels reproducible
previously, pixel values were regenerated on every calculation, so they
changed on recomputation

pixel values are now generated from the pixel (x, y) coordinate plus a per-call
seed

thanks MvGulik, see

https://github.com/jcupitt/nip2/issues/60

https://github.com/jcupitt/libvips/issues/583
2017-01-24 09:36:25 +00:00
John Cupitt
d4d41eef6a doc improvement
see https://github.com/jcupitt/libvips/issues/521
2016-09-12 11:15:56 +01: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
88252e6794 float output from worley
no need to int it
2016-08-11 21:51:58 +01:00
John Cupitt
394fbce999 fix docs for vips_text()
oops, it's align, not alignment argh

thanks gargsms
2016-07-27 23:02:28 +01:00
John Cupitt
54aea13a8c type comments for vips_text() 2016-07-27 17:43:28 +01:00
John Cupitt
2dc43198e4 final fixups 2016-07-24 14:47:22 +01:00
John Cupitt
6db9a2fdf9 better smoothing for perlin 2016-07-24 12:58:45 +01:00
John Cupitt
c469bb3983 perlin sort-of works 2016-07-24 11:46:42 +01:00
John Cupitt
99766dbd83 better hash for worley 2016-07-19 12:29:36 +01:00
John Cupitt
e14c97359a done!
perlin next I guess
2016-07-19 11:53:56 +01:00
John Cupitt
dac671439c kind-of working 2016-07-19 10:57:21 +01:00
John Cupitt
de981cd9ec docs tweak 2016-07-08 12:18:07 +01:00
John Cupitt
0f2d1a6b0b improve docs 2016-07-08 09:15:56 +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
2ca7b29214 better gauss mat generation 2016-03-10 22:01:55 +00:00
John Cupitt
d351e07a6b finish up 2016-03-10 17:33:34 +00:00
John Cupitt
2698688c94 oops spelling 2016-01-26 13:37:56 +00:00
John Cupitt
4d18300560 add VIPS_FABS/MAX/MIN/CLIP
macros which use the gcc __builtin_fabs() etc. functions when they can
2016-01-26 12:26:21 +00:00
John Cupitt
1504ca7cdc have a more formal max image dimension
we now have VIPS_MAX_COORD for maximum image dimension, set to 10m
pixels ... we could go up to 2bn, but 10m seems a reasonable max, at
least for now

see https://github.com/jcupitt/libvips/issues/355
2015-12-03 12:14:39 +00:00
John Cupitt
956e2f5cdf tiny cleanups
see https://github.com/jcupitt/libvips/pull/327

- small layout changes
- rename @linespacing as @spacing
- add ChangeLog notes and gtk-doc notes
- fix text arg priority
2015-09-20 11:08:44 +01:00
Lei Yang
13fad7a264 create/text: adding linespacing support 2015-09-18 22:01:18 +08:00
John Cupitt
8c5ef3812e oops, fabs()/abs() mixup 2015-05-31 18:10:34 +01:00
John Cupitt
59b47f3900 better compt for old vips_gaussmat() code 2014-12-17 10:36:14 +00:00
John Cupitt
6e2135d8b5 mask builders take prec, not integer
vips_gaussmat() and vips_logmat() used to default to float, but
vips_conv() defaulted to int ... so this failed:

	vips gaussmat m.v 2 0.1 --separable
	vips convsep k2.jpg x.jpg m.v

since we were using a small float mask with an integer convolution

This change makes everything int by default, with gaussmat having a new
param called --precision whose arg can be int or float.

The old @integer param is deprecated.
2014-12-16 20:48:11 +00:00
John Cupitt
384a5e05dc change parameters of vips_gaussblur()
sorry :-(

The old param (passing sigma*2 as an int) were just too confusing
coming from other packages. This new behaviour matches ImageMagick, and
almost everyone else in the world.

A new optional param lets you set the minimum amplitude as well.
2014-11-19 12:27:26 +00:00
John Cupitt
394149e9e8 fix all docs warnings 2014-11-17 10:32:40 +00:00
John Cupitt
ccedc7c037 better random numbers for gaussnoise
fixes a problem with repeated use of gaussnoise
2014-11-08 19:37:18 +00:00
John Cupitt
be4ffa6d8a more pyvips8 docs
and cleanups of various small doc markup errors
2014-11-07 14:49:18 +00:00
John Cupitt
02e8c600db more small docs work
and don't cache gaussnoise
2014-11-07 09:25:40 +00:00
John Cupitt
ce8d7e5789 tweaks 2014-09-13 18:03:25 +01:00
John Cupitt
8a1397b91f small python fixes 2014-09-13 17:24:59 +01:00