Commit Graph

5562 Commits

Author SHA1 Message Date
John Cupitt
b92c55770f openexr shut down early
for non-tiled images anyway
2018-08-19 05:30:49 +01:00
John Cupitt
a0c8417109 Merge branch 'master' into close-input-early 2018-08-19 05:24:28 +01:00
John Cupitt
93e3ffb0bb note on tiled tiff read
I had a quick go at making tiffload shut down early for tiled tiff read,
but it's not really possible because tiled read is not guaranteed to be
ordered.

Add a note for future reference.
2018-08-19 05:19:11 +01:00
John Cupitt
fdafb4de5f oop fix tiff2vips change
y is relative
2018-08-19 04:26:24 +01:00
John Cupitt
79cafbd604 regen some docs 2018-08-17 18:04:47 +01:00
John Cupitt
cfeef85677 revise README for 8.7 2018-08-17 17:52:45 +01:00
John Cupitt
10d1aeb6f2 make pdf load close early
but only in seq mode
2018-08-17 11:14:06 +01:00
John Cupitt
0b4cef06b7 close early for tiffload 2018-08-16 16:00:14 +01:00
John Cupitt
b836749b75 close jpeg read early
The current behaviour (close input handles on unref) works for languages
like C / C++ / Python / Rust / etc. where things get unreffed automatically
when they go out of scope.

On languages like Ruby / C# / node / etc. where things are unreffed on GC,
files can stay open for a long time after you've finished with them. This
interacts in an unfortunate way with the Windows default of refusing to
remove open files.

This change closes file handles as soon as the scan of the input file
finishes, and therefore produces something closer to expected behaviour
for GCd languages on Windows.

see https://github.com/kleisauke/net-vips/issues/12
2018-08-16 15:47:48 +01:00
John Cupitt
f3ef6e52ea bump max input images for sum
was only 64
2018-08-16 15:23:24 +01:00
John Cupitt
d48f80130b switch to g_open()/g_fopen()
Might help with files being left open, perhaps. It's certainly neater.

See https://github.com/kleisauke/net-vips/issues/12
2018-08-15 14:58:12 +01:00
John Cupitt
68fd9c8de6
Merge pull request #1061 from criteo-forks/master
Fix missing area unref in getpoint()
2018-08-14 18:00:39 +01:00
Dimitri Bouron
1c1aeb2262
Merge pull request #1 from dbouron/master
Fix missing area unref in getpoint()
2018-08-14 14:32:59 +02:00
Dimitri Bouron
725d39e691 Fix missing area unref in getpoint()
Signed-off-by: Dimitri Bouron <d.bouron@criteo.com>
2018-08-14 14:19:01 +02:00
John Cupitt
01b66f5ccd clear gif pages before load
some gifs may not clear the background, so we must init pages as 0

see https://github.com/lovell/sharp/issues/1331
2018-08-13 17:30:54 +01:00
John Cupitt
9a5249ca20 tag unicode strings as unicode
seems to help with py2.7 anyway
2018-08-12 18:25:19 +01:00
John Cupitt
643e7c0ea2 mapim fix for strange float values
mapim could fail for float index images outside the int range

minor speedup too
2018-08-12 17:10:23 +01:00
John Cupitt
c1dcb0c535 Merge branch 'master' of github.com:jcupitt/libvips 2018-08-07 15:07:46 +01:00
John Cupitt
0ccde9e0f7 README tweaks 2018-08-07 15:07:38 +01:00
John Cupitt
fc7fde194c
Merge pull request #1054 from radarhere/patch-1
Fixed typo
2018-08-07 10:50:20 +01:00
Andrew Murray
e64351de28
Fixed typo 2018-08-07 19:47:28 +10:00
John Cupitt
0b3565c04d update radiance load from upstream
thanks Greg Ward
2018-08-03 18:31:31 +01:00
John Cupitt
0beb5e9165 make test-suite survive make dist 2018-07-25 17:17:13 +01:00
John Cupitt
96d5008501 fix make dist 2018-07-25 16:28:23 +01:00
John Cupitt
f005e4a188 add test for new ICO sniffer 2018-07-25 15:34:31 +01:00
John Cupitt
2bfb471a20 don't escape \n\t\r in xml
\n especially happens rather a lot heh
2018-07-25 15:29:42 +01:00
John Cupitt
9147bb64c4 notes 2018-07-24 17:44:41 +01:00
John Cupitt
e89dac20bb add sniffing framework to magickload
though it only spots ICO for now

see https://github.com/jcupitt/pyvips/issues/39
2018-07-24 17:38:36 +01:00
John Cupitt
72f589764a remove the @format param to magickload 2018-07-24 17:03:38 +01:00
John Cupitt
b7bac0d88d fix vips7 split on empty filename
a "" filename in vips7 compat mode could trigger a read beyond the end of
the string

see https://github.com/jcupitt/libvips/issues/1040
2018-07-23 18:50:53 +01:00
John Cupitt
479610ff30 better handling of ASCII control chars in xml
represent ASCII control chars as their unicode glyphs in XML

see http://www.shacknews.com/chatty?id=37738911#item_37738911
2018-07-23 18:21:15 +01:00
John Cupitt
19b27c846e fix possible used-before-set in radiance.c
some versions of glib might not zero some parts of the Read struct

see https://github.com/jcupitt/libvips/issues/1040
2018-07-23 15:55:32 +01:00
John Cupitt
2d94fe732a escape ASCII control chars in xml
stops some XML parse errors on corrupt metadata

see https://github.com/jcupitt/libvips/issues/1039
2018-07-23 14:55:37 +01:00
John Cupitt
9fa03e80c7 fix buffer overflow in radiance read
old-style RLE images could overflow the output buffer if incorrectly coded

see https://github.com/jcupitt/libvips/issues/1039
2018-07-23 12:55:41 +01:00
John Cupitt
136c8d8cd6 credit rad change 2018-07-22 18:51:29 +01:00
John Cupitt
26fcccba9b fix out of bounds write in radiance
It was using a fixed 64-byte stack buffer for the RHS of format lines.
Lines can be MAXLINE (2048) chars, so a long line could overflow. If we
use MAXLINE for the small buffer as well, we are guaranteed to not
overflow.

thanks HongxuChen

See https://github.com/jcupitt/libvips/issues/1039
2018-07-22 16:28:29 +01:00
John Cupitt
927f92a8bb update rad read from rad5R1
hopefully the new radiance code will be more robust
2018-07-22 13:04:46 +01:00
John Cupitt
0077017ad8 fix a tiff2vips crash on fractional samples
tiff2vips failed if samples_per_pixel was not a multiple of 8, ie.
byte-aligned, and the image was not palette-ised

thanks HongxuChen

see https://github.com/jcupitt/libvips/issues/1039
2018-07-21 17:06:01 +01:00
John Cupitt
3565808281 Merge branch 'add-nifti-support' 2018-07-20 18:20:52 +01:00
John Cupitt
8730d8ddf1 add nifti ext save 2018-07-20 18:20:26 +01:00
John Cupitt
e72ad7045d add a nifti test 2018-07-20 17:23:06 +01:00
John Cupitt
3d5b0b814f merge in test suite 2018-07-20 13:58:27 +01:00
John Cupitt
3201b4373d Merge branch 'master' into add-nifti-support 2018-07-20 13:57:51 +01:00
John Cupitt
d03416d386 works!
just needs some tests

could be faster too
2018-07-19 17:45:54 +01:00
John Cupitt
9179156132 almost working
get a 1x1 pixel output now
2018-07-19 16:06:21 +01:00
John Cupitt
06a40cc7ee sort-of works
but can't set meta correctly, try:

	$ vipsheader -a sub-CC00050XX01_ses-7201_T2w.nii.gz

see all fields, but

	$ vips copy sub-CC00050XX01_ses-7201_T2w.nii.gz x.v
	$ vipsheader -a x.v

only see a few, odd
2018-07-18 17:09:53 +01:00
John Cupitt
ae5cbcd985 add note on '!' to vipsthumbnail docs
oops, this was missing, thanks beaudet

see https://github.com/jcupitt/libvips/issues/659
2018-07-17 12:39:48 +01:00
John Cupitt
1028907e58 more save work 2018-07-16 12:49:12 +01:00
John Cupitt
7496381fc9 more getting ready for niftisave 2018-07-13 13:08:23 +01:00
John Cupitt
d186ac69d6 a more more work on niftisave 2018-07-10 17:16:49 +01:00