Commit Graph

959 Commits

Author SHA1 Message Date
John Cupitt 25dd60c781 add tests
all done, I think
2016-11-23 17:20:04 +00:00
John Cupitt bba1aba4b6 don't clear meta before creating a pipeline
vips__image_copy_fields_array() used to wipe meta on the output before
merging the input images. This broke foreign.c in some cases, since it
likes setting some meta on the output before calling the subclass
loaders, and they sometimes call write().

see https://github.com/jcupitt/ruby-vips/issues/93
2016-11-22 18:04:58 +00:00
John Cupitt 85be55fe4f add vips_image_get_fields()
helps bindings (which struglle with vips_image_map()) get a list of
header fields

works from py, but not ruby, I guess gchar** isn't a supported type for
ruby-gnome

see https://github.com/jcupitt/libvips/issues/533
2016-11-12 16:37:13 +00:00
John Cupitt bb0a6643f9 move @fail from jpegload into the base load class
and add fail support to csv and openslide

see https://github.com/jcupitt/libvips/issues/546
2016-11-12 15:33:35 +00:00
John Cupitt d4b4eb44a3 works! 2016-11-02 11:07:30 +00:00
John Cupitt 3f1f950bff add vips_image_hasalpha() 2016-10-31 11:14:27 +00:00
John Cupitt e715c62e27 Merge branch '8.4' 2016-10-28 16:51:43 +01:00
John Cupitt a7edd235c4 improve compat with ancient glibs
and fix a tiny threading leak
2016-10-28 16:25:31 +01:00
John Cupitt ca7b51fb9e revise header get/set
rework header.c

- built-in enum fields, like "interpretation" are handled as enums, not
  ints
- vips_image_get_*() functions always convert to the target type if they
  can
- rename "field" to "name" in the docs
- clarify docs
2016-10-20 12:41:32 +01:00
John Cupitt 26a534eeac count threads for leak test
see https://github.com/jcupitt/libvips/issues/542
2016-10-19 10:52:18 +01:00
John Cupitt 1a915db678 no longer need to clean up main buffers
thread-private buffers are now only on workers, no need to to start them
up or free them on the main thread
2016-10-19 09:58:13 +01:00
John Cupitt b4d6d6c590 compiles, but untested 2016-10-13 14:57:18 +01:00
John Cupitt ccfe4cb215 seems to work?
needs stress testing still

see https://github.com/jcupitt/libvips/issues/535
2016-10-10 15:12:12 +01:00
John Cupitt fc9322f71b move concurrency_set into the public API
oops, it was off in threadpool and wasn't being scanned
2016-09-09 08:52:14 +01:00
John Cupitt 57e1423d57 Merge branch 'master' into windows-unicode 2016-09-05 13:12:06 +01:00
John Cupitt c4a1ac6310 fix ROUND_UP, add a test for felix's corner case 2016-08-20 13:18:25 +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 578764b582 gifload does unicode on win
sigh again
2016-08-17 14:37:15 +01:00
John Cupitt feca00958c seems to be sort-of working! 2016-08-16 18:33:48 +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