Commit Graph

3965 Commits

Author SHA1 Message Date
John Cupitt
3570f61f3d Merge branch 'master' of github.com:jcupitt/libvips 2015-12-04 07:28:52 +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
848adca836 fix an off-by-one error in mapim 2015-12-02 16:09:39 +00:00
John Cupitt
8ebed8fe03 fix the bg render thread in sinkscreen
it could exit under heavy load, resulting in black everywhere ... now
let it exit when there's no work, and restart next time a dirty tile
appears
2015-12-02 15:51:25 +00:00
John Cupitt
c57a03d8a6 improve vips_sink_screen() shutdown
is now very careful not to do anything to output images after they've
been unreffed ... fixes a crash in vipsdisp
2015-12-01 13:12:07 +00:00
John Cupitt
2409767679 add vips_image_new_from_memory_copy()
takes a copy of a memory area when making an image ... this helps bindings
for languages which don't have much control over memory

see https://github.com/jcupitt/libvips/issues/346
2015-11-25 17:05:59 +00:00
John Cupitt
6573af3c2a always strip dzsave tile metadata
dzsave now uses :strip => true for all tiles. There's no point adding
all the metadata to every tile, so hopefully this won't break anything.

Thanks Benjamin, see: https://github.com/jcupitt/libvips/issues/349
2015-11-25 13:29:23 +00:00
John Cupitt
9b03b27b9c don't write JFIF headers with [strip]
saving a jpg with [strip] turned on now stops the APP0 jfif headers
being written

thanks Benjamin, see: https://github.com/jcupitt/libvips/issues/349
2015-11-25 13:17:30 +00:00
John Cupitt
d42caca820 Merge branch 'master' of github.com:jcupitt/libvips 2015-11-24 14:54:29 +00:00
John Cupitt
c79e77438f add restrict tags 2015-11-24 14:53:40 +00:00
John Cupitt
18baf40b1a fix mapim typo
oops! typo ... also an off-by-one issue for larger stencils

more error checking in interpolators

fix rounding in nohalo/lbb ... they were rounding to nearest in the
interpolator, rather than using floor. This broke assumptions about
stencil position elsewhere. The right way to do centre convention is to offset
the whole input by 0.5 pixels.
2015-11-22 10:29:45 +00:00
John Cupitt
16c4eeabad python does auto complx/uncomplx
this is a bit ugly :-(
2015-11-20 16:29:43 +00:00
John Cupitt
a8b78371f8 better run_cmplx()
ready to go into Vips.py
2015-11-20 14:55:28 +00:00
John Cupitt
32f6f5ed22 fix atan() for -ve angles 2015-11-20 14:45:51 +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
40173838d1 use atan2 and hypot more
might be a little quicker
2015-11-19 14:34:03 +00:00
John Cupitt
743b21e83e fix off by 1 error 2015-11-19 13:25:52 +00:00
John Cupitt
d27bbd6803 add mapim test
and a python mapim example
2015-11-19 11:44:58 +00:00
John Cupitt
e47b631105 add notes 2015-11-19 09:55:03 +00:00
John Cupitt
bfbe254ece sync 2015-11-17 10:13:48 +00:00
John Cupitt
cdccf01c46 rename as mapim 2015-11-16 20:32:48 +00:00
John Cupitt
c858066fe0 works, but needs testing 2015-11-16 20:09:27 +00:00
John Cupitt
8e6ed3ef30 compiles 2015-11-16 14:58:51 +00:00
John Cupitt
d32bc97ccb start hacking it in 2015-11-16 11:08:10 +00:00
John Cupitt
3b32200cc1 sizealike() and friends elide completely
sizealike() / formatalike() and bandsalike() used to just vips_copy() if
the image didn't need any changes ... this was fast, but left a
vips_copy_gen() in the pipeline, wasting a lot of space on the C stack
during recursion.

They now vanish completely if the image is already in the right format.
Since we call them before most image processing operations, and
often all three of them, this saves a lot of C stack, more than x2 even
in simple cases.

There might also be a measureable CPU saving if the operations are very
simple (eg. insert).

See:

http://stackoverflow.com/questions/33658795/difficulty-with-handling-very-large-image-using-vips
2015-11-13 14:48:02 +00:00
John Cupitt
d88304a297 sync 2015-11-12 09:15:31 +00:00
John Cupitt
03a4e54649 slightly less stupid float->int mask
still not quite right
2015-11-11 16:51:08 +00:00
John Cupitt
f32ab06a1c fix test suite 2015-11-11 15:00:15 +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
66fe338d36 better alpha handling for tiff save
the tiff saver was writing all five-band images as CMYKA, even if they
were tagged as srgb ... it now follows the interpretation tag and will
write many alpha channels instead

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

thanks sadaqatullahn
2015-11-11 08:55:42 +00:00
John Cupitt
aedb174537 note 2015-11-11 08:33:41 +00:00
John Cupitt
ca51b46e9a docs, c++, all done 2015-11-07 20:54:00 +00:00
John Cupitt
295b18585a python uses bandjoin_const when possible
added a test case, speedup seems worthwhile
2015-11-07 20:34:56 +00:00
John Cupitt
9cb2674a77 now works woo
python interface plus test and benchmark to go

update c++ too I guess

oh docs as well sigh
2015-11-07 18:47:02 +00:00
John Cupitt
3ed0904fab fix travis 2015-11-06 15:56:13 +00:00
John Cupitt
2f98f38d8a started bandjoinconst 2015-11-06 14:58:32 +00:00
John Cupitt
de65da85b9 smarter conversion of float masks to int
we were just rint()ing masks going from float -> int, but this could
give bad results in some cases, with output images becoming darker
or lighter, as individual elemets moved up or down

now we adjust the output scale to try to keep the overall brightness
the same, if we can

see: https://github.com/jcupitt/libvips/issues/344
2015-11-06 14:29:23 +00:00
John Cupitt
d38a78d0ea notes 2015-11-05 12:40:03 +00:00
John Cupitt
82d96fb73e notes 2015-11-04 21:19:31 +00:00
John Cupitt
30a3d2f7fa fix shrink with non-int args
fix a silly bug, add a test
2015-11-04 12:00:49 +00:00
John Cupitt
d126a733a0 better rgb16/grey16 conversion
things like float tagged as rgb16 did not save well as png ... new
conversion rules should help

see https://github.com/jcupitt/libvips/issues/344
2015-11-04 11:34:52 +00:00
John Cupitt
7f400da698 better Py docs
talks about new_from_memory etc.
2015-11-04 11:03:36 +00:00
John Cupitt
b853012787 add memory.h to Python API
this makes the memory high water visible to Python, handy for testing
2015-11-04 10:09:06 +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
John Cupitt
07ca974273 note on IM link problems
vips won't build against current imagemagick

seems to be a change in IM, see:

	http://www.imagemagick.org/discourse-server/viewtopic.php?f=3&t=28603

see also:

https://github.com/jcupitt/libvips/issues/343
2015-10-30 14:53:35 +00:00
John Cupitt
c27fce059d Merge branch 'master' of github.com:jcupitt/libvips 2015-10-27 12:08:53 +00:00