Commit Graph

4096 Commits

Author SHA1 Message Date
John Cupitt
58183088ed another try at no-gsf 2015-12-21 15:21:46 +00:00
John Cupitt
bb545542d7 oop, fix build without libgsf 2015-12-21 15:05:46 +00:00
John Cupitt
73436ddfc2 add @properties flag to tiffsave
writes all vips metadata to imagedescription tag
2015-12-21 14:43:59 +00:00
John Cupitt
0deb640bc4 load and save TIFFTAG_IMAGEDESCRIPTION
this often has useful metadata in, for example the OME spec has all the
metadata in there as an XML document

see https://github.com/jcupitt/libvips/issues/358
2015-12-21 13:53:33 +00:00
Daniel Gasienica
09a30b602b Use 254 pixels as default tile size
I remember @benvanik, a friend and colleague, who worked on our DZI renderer (Seadragon) told us that, I believe, it’s better for GPUs to have power of two sized tiles, so 254px + 2 x 1px tile overlap will give you 256 pixel.s

> To keep my tiles nicely sized, I shrink in instead of expand out – that means my tiles are really 254×254 with a 1px border, so the images are 256x256px with 254×254 of useful imagery. If you wanted larger tiles, you’d go 510×510 with 1px border making 512×512 tiles.
> — Source: http://www.noxa.org/blog/2009/11/29/megatextures-in-webgl-2/
2015-12-20 21:43:41 -08:00
John Cupitt
7267ca4a28 lower max threads in make check
seems to annoy travis
2015-12-18 09:11:15 +00:00
John Cupitt
e40a3d166e oops 2015-12-17 13:49:39 +00:00
John Cupitt
efed79f298 Merge branch 'new-bilinear' 2015-12-17 13:43:51 +00:00
John Cupitt
fb084ef6a6 working 2015-12-17 13:43:34 +00:00
John Cupitt
c74f7457a6 Merge branch 'master' of github.com:jcupitt/libvips 2015-12-17 12:58:04 +00:00
John Cupitt
253cb8e2e3 fix up dzsave overlap handling
There was a mixup with the previous fix to dzsave overlap handling,
correct it and update the test suite.

In the previous revision, dzsave overlapped tiles by overlap and sized
them by tile_size. In fact, tiles should be sized as (tile_size + overlap
* 2), ie. tile_size refers to the number of unique pixels per tile.

See https://github.com/jcupitt/libvips/issues/357
2015-12-17 11:54:38 +00:00
John Cupitt
bf7bca1851 correct default overlap value
should be 1 for default layouot mode

see https://github.com/jcupitt/libvips/issues/357
2015-12-16 16:26:30 +00:00
John Cupitt
7068fbb20b new bilinear interpolator 2015-12-16 14:48:00 +00:00
John Cupitt
42f5403cfa notes 2015-12-15 10:49:02 +00:00
John Cupitt
af6e00e10f Merge branch 'master' of github.com:jcupitt/libvips 2015-12-15 10:45:23 +00:00
John Cupitt
70cf12d034 notes 2015-12-15 10:44:30 +00:00
John Cupitt
7c506b4351 stupid gtk-doc 2015-12-14 14:08:45 +00:00
John Cupitt
d093b6447b make sure tiff load is THINSTRIP
it was always SMALLTILE before, since it was the result of _header which
set downstream behaviour, not the actual load
2015-12-14 14:07:48 +00:00
John Cupitt
26ae034389 speeling 2015-12-14 14:07:32 +00:00
John Cupitt
3d163bb4e5 oops, DEBUG was left on in buffer.c
argh, this was burning a lot of CPU for no reason

added a thing to warn if this is left on again
2015-12-14 14:06:16 +00:00
John Cupitt
66a6a96c61 why not 2015-12-13 18:12:17 +00:00
John Cupitt
1593b23fc4 allow smaller rowsperstrip
and some other tiny things
2015-12-13 14:55:56 +00:00
John Cupitt
ff1dd39432 more tests for arrayjoin 2015-12-12 12:38:29 +00:00
John Cupitt
5916e25c31 rename python bandjoin as ibandjoin
oh argh class and instance methods are in the same namespace, so we have
to rename the instance one as ibandjoin

also, start adding a test for arrayjoin
2015-12-12 12:29:20 +00:00
John Cupitt
6e9834e623 add vips_arrayjoin() 2015-12-11 15:14:08 +00:00
John Cupitt
a649ae111d make join use a bit less stack
helps us join slightly larger image arrays
2015-12-11 12:35:12 +00:00
John Cupitt
a57cccbf0f fix with orc-0.4.11 2015-12-08 15:33:57 +00:00
John Cupitt
06a627fc51 fix against older orcs
oops, older orcs don't have those limit constants
2015-12-08 15:16:52 +00:00
John Cupitt
a0ead35bbb possible improve orc stability
mutex around calls to the orc compiler, check more error returns, use
limits from the orc headers
2015-12-08 14:57:48 +00:00
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
e19f9ea0b3 working!
doesn't seem to slow us down significantly ... before:

$ time vips dzsave CMU-1.svs x --layout google --background "243 243 243 255"
real	1m1.940s
user	2m15.004s
sys	0m37.092s

after:

$ time vips dzsave CMU-1.svs x --layout google --background "243 243 243 255"
strip_work: skipping blank tile 176 x 67
strip_work: skipping blank tile 21 x 112
real	1m3.503s
user	2m16.012s
sys	0m40.328s
2015-11-24 17:08:56 +00:00
John Cupitt
bf65adc92b try skipping blank tiles
... again, but maybe we can be quicker this time
2015-11-24 15:07:23 +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