Commit Graph

941 Commits

Author SHA1 Message Date
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 c658332215 vips_conva() done and working
remove im_conva() nest, add tests
2016-08-03 18:29:50 +01:00
John Cupitt 2e8f14c6a5 Merge branch 'master' into rewrite-convf 2016-08-01 15:08:45 +01:00
John Cupitt e439c5f78f add .svg.gz suffix
allow .x.y suffixes
2016-08-01 14:57:33 +01:00
John Cupitt b5781a5760 Merge branch '8.3' 2016-07-30 10:57:40 +01:00
John Cupitt 88148318eb fix performance regression
the extra check on bandfmt in sizeof() in 8.3.2 was causing some performance
problems ... move the check to file read, so we only do it once
per image, not once per pixel or scanline

thanks Lovell!
2016-07-30 10:51:54 +01:00
John Cupitt c469bb3983 perlin sort-of works 2016-07-24 11:46:42 +01:00
John Cupitt dac671439c kind-of working 2016-07-19 10:57:21 +01:00
John Cupitt 9c18f1b4d5 yet mmore doc fixes
classes are working again in gtk-doc, yay
2016-07-13 22:39:16 +01:00
John Cupitt b814baa78c fix various small doc problems 2016-07-13 17:07:26 +01:00
John Cupitt f873a51b09 sort-of working 2016-07-06 14:56:28 +01:00
John Cupitt df81a6fe24 almost there 2016-06-30 14:59:20 +01:00
John Cupitt bd7bad1916 almost done vector path 2016-06-28 11:07:20 +01:00
John Cupitt 5e660addc8 convi working
need to add vector path next
2016-06-24 16:03:15 +01:00
John Cupitt 93a55310d3 compiles 2016-06-23 15:00:26 +01:00
John Cupitt b90145ca31 free pixel buffers on image close
We were freeing pixel buffers on thread exit. This was convenient, but
meant that main thread buffers were not freed until program exit. As a
result, long-running programs which created main thread buffers would
slowly fill the operation cache with useless junk, forcing everything else out.

This change also frees pixel buffers on image close. This makes the
cache work much better in long-running programs, and can substantially
reduce memory use.

See https://github.com/jcupitt/libvips/issues/466
2016-06-06 13:50:25 +01:00
John Cupitt 15878bffca Revert "free main-thread pixel buffers"
This reverts commit 2a77301033.
2016-06-06 06:38:18 +01:00
John Cupitt 2a77301033 free main-thread pixel buffers
threads keep pixel buffers in thread-private storage, and free these
buffers on thread exit ... this means buffers created by the main thread will
only be freed on program exit!

if your program creates any main-thread buffers, these buffers will
eventually fill the operation cache and force everything else out,
making the cache useless

this patch explicitly frees main-thread pixel buffers on image close
2016-06-05 16:59:07 +01:00
John Cupitt 7a91eaa583 tiff save converts for jpg in jpg mode
when jpg compression is on, tiffsave now converts the input image for
jpg save ... previously, it would try to send a tiff-formatted image
(eg. perhaps with an alpha channel, or float data), which would fail

see https://github.com/jcupitt/libvips/issues/449
2016-05-31 22:04:07 +01:00
John Cupitt d51911cda8 fix up orientation docs
document the new orientation system

various tiff/jpeg doc fixups too
2016-05-28 11:17:17 +01:00
John Cupitt 5a9f2c787b compiles
needs testing etc.
2016-05-26 14:58:04 +01:00
Henri Chain 10a3782590 Add buffer write support for HDR Radiance 2016-05-19 22:32:17 +02:00
John Cupitt db11d3b973 allow nested [] in CLI args
this now works:

	vips copy x y.dz[suffix=.jpg[Q=90]]
2016-05-16 11:09:47 +01:00
John Cupitt 48ef215479 tiny fixups for the webp commit
just small formatting changes, plus an unneeded var

see

	https://github.com/jcupitt/libvips/pull/430
2016-05-02 09:55:16 +01:00
Felix Bünemann f834ea39f6 Add lossy compression "preset" option to webpsave
This allows to tune the lossy webp encoder for certain types of images.
2016-04-22 23:57:07 +02:00
John Cupitt 2c646a02e4 better jpeg autorot
jpeg write is more careful about removing exif tags that have been
removed from the image metadata

it failed previously if there were multiple Orientation tags
2016-04-13 08:39:29 +01:00
John Cupitt a7e564ed97 autorot looks in every ifd
some images have multiple orientation tags ... look and remove
orientation tags everywhere
2016-04-12 18:31:19 +01:00
John Cupitt 3115310bb7 fix no-orc builds 2016-03-26 10:45:31 +00: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 05156edd15 add orc path for reducev
works, but still not quite right, see some banding
2016-03-18 17:41:51 +00:00
John Cupitt dc7902b12f Merge branch 'master' into add-lanczos3 2016-03-13 11:23:03 +00:00
John Cupitt d351e07a6b finish up 2016-03-10 17:33:34 +00:00
John Cupitt a26291a426 reducehl3 is done
sort of anyway, tinkering with optimization
2016-03-09 22:47:02 +00:00
John Cupitt 25c3c49d1c better handling of cast+shift for non-int formats
before, im.cast(uchar, shift = true) where im was float and tagged as
rgb16 would not shift the image, since it's unclear how much to shift a float
type by

now we do two casts: first, we guess the numeric range from the
interpretation, so rgb16 would be ushort, so we cast float->ushort;
second, we cast to the target type and do the shift on the way

see https://github.com/jcupitt/libvips/issues/397

thanks apacheark
2016-03-01 11:31:54 +00:00
John Cupitt ee1874c5ca much better handling of arrayimage cli args
we were not setting the access hint on arrayimage args, so

arrayjoin "$(echo *.jpg)" x.tif[bigtiff] --across 10

would open all the jpg images to memory, usually, in random mode

now arrayimage args see the operation's access hint (seq in this case),
for much better behaviour

also, we allow any whitespace as an arg separator in arrayimage from
string
2016-02-27 20:37:20 +00:00
John Cupitt 840c3f2e63 oops typo
thanks Lovell
2016-02-22 14:08:36 +00:00
John Cupitt 9262d672b7 almost done
a valgrind failure still
2016-02-12 10:53:04 +00:00
John Cupitt bd985731eb unpremultiply svgload / pdfload
cairo uses premultipled ARGB, we need to undo this for transparency to
work correctly
2016-02-11 09:06:09 +00:00
John Cupitt 153886d2eb add svgload
load from bubffer is not working though, strange ... it seems to be
generating a 16-biit image?
2016-02-09 11:01:12 +00:00
John Cupitt 991cc4f88b rename as pdfload 2016-02-08 20:25:03 +00:00
John Cupitt bff4157773 add load pdf from buffer 2016-02-08 17:48:18 +00:00
John Cupitt adfd25a5ed byteswap popplerload
and better path absoluteization
2016-02-08 16:37:47 +00:00
John Cupitt 69c2fe00f7 add C API and docs for popplerload 2016-02-08 10:05:37 +00:00
John Cupitt 3e78bdb6a9 reduceh is working! 2016-01-27 14:34:06 +00:00
John Cupitt 8b09c86492 add cubich interp., start reduceh 2016-01-27 11:12:36 +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
Lovell Fuller 0cac224431 Replace use of "Duff's device" with for-loop to allow compiler to optimise.
Reduces CPU instruction count of conv_gen function by ~30%.
Improves performance of convolution operation by 20-25%.
2016-01-25 21:17:41 +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
Lovell Fuller 90c1fb9a94 Use gcc/clang isnan and isinf builtin functions where available.
These are used heavily in the building of look-up tables at
start-up time and therefore improve vipsthumbnail perf by ~4%.
2016-01-20 19:02:14 +00:00