Commit Graph

5402 Commits

Author SHA1 Message Date
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
John Cupitt d06c2fee22 use exif_tag_get_name_in_ifd() everywhere
exif tag names change with the ids they appear in, so you must always
use exif_tag_get_name_in_ifd(), not exif_tag_get_name()

see: https://github.com/jcupitt/libvips/pull/1030
2018-07-09 09:35:39 +01:00
John Cupitt 274fd7468c
Merge pull request #1030 from Nan619/master
Should use exif_tag_name_in_ifd() instead of exif_tag_get_name()
2018-07-09 09:15:14 +01:00
Water Liu bba03a10d7 Should use exif_tag_name_in_ifd() instead of exif_tag_get_name()
vipsheader -a path/to/foo.jpg
...
exif-ifd2-ExifVersion: Exif Version 2.21 (Exif Version 2.21, Undefined, 4 components, 4 bytes)
...
exif-ifd3-InteroperabilityIndex: N (N, ASCII, 2 components, 2 bytes)
exif-ifd3-InteroperabilityVersion: 40/1 1/1 58/100 (40,  1, 0.58, Rational, 3 components, 24 bytes)

The above two tag name are incorrect, should be:

exif-ifd3-GPSLatitudeRef: N (N, ASCII, 2 components, 2 bytes)
exif-ifd3-GPSLatitude: 40/1 1/1 58/100 (40,  1, 0.58, Rational, 3 components, 24 bytes)

Signed-off-by: Water Liu <water@yunify.com>
2018-07-09 11:14:12 +08:00
John Cupitt 8cf34fd8f9 only set PREDICTOR if necessary
removes a warning if libtiff is compiled without support
2018-07-08 20:02:02 +01:00
John Cupitt 2695916afb test region_shrink
just sets the option, does not verify accuracy :(
2018-07-07 17:07:35 +01:00
John Cupitt 92ff5be4b8 add notes on testing to the README 2018-07-07 16:22:17 +01:00
John Cupitt 43199e7b27 add tests for exif string fields
test exif string tag set/save/load
2018-07-06 17:01:38 +01:00
John Cupitt 51e7645859 fix "make check"
eited the wrong file :(
2018-07-06 16:11:02 +01:00
John Cupitt d510807e90 vmoe the test suite back into libvips 2018-07-06 15:43:20 +01:00
John Cupitt f0a44ce936 add a few more string types 2018-07-06 12:09:48 +01:00