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
John Cupitt
34bb1fc83c
save framework done
2018-07-06 11:53:35 +01:00
John Cupitt
76eef8912e
start niftisave
2018-07-05 17:38:37 +01:00
John Cupitt
b0168a3cf6
remove a copy on load
2018-07-05 15:22:11 +01:00
John Cupitt
63bb380569
fix ASCII exif tag write
...
sigh libexif has three different types of string write
2018-07-04 08:50:14 +01:00
John Cupitt
3a9adbcea9
seems to work
...
could probably add some more fields
2018-07-03 16:36:39 +01:00
John Cupitt
c12cd6d2cb
not quite there
...
trying to set EXIF_TAG_USER_COMMENT but not working
2018-07-03 14:55:47 +01:00
John Cupitt
1cc7dd6af7
start hacking
2018-07-03 10:01:14 +01:00
John Cupitt
039c716f63
revise FIND_*() macros
...
they should set CFLAGS, not INCLUDE
2018-07-02 20:22:41 +01:00
John Cupitt
294104da32
more TODO notes on niftiload
2018-07-02 15:15:37 +01:00
John Cupitt
06e8d1d523
load seems to work
2018-07-02 14:57:24 +01:00
John Cupitt
d756705929
set EXTRASAMPLES on tiff pyr layers
...
we were not copying EXTRASAMPLES when copying pyr layers
2018-07-02 08:32:14 +01:00
John Cupitt
7716fa957b
nifi header read done
2018-06-30 21:57:00 +01:00
John Cupitt
6dc6b4f722
add niftiload skeleton
2018-06-29 17:31:17 +01:00
John Cupitt
93881b8dec
add FIND_NIFTI
...
looks for libniftiio
2018-06-29 16:32:28 +01:00
John Cupitt
10c4831a70
misplaced include broke the build
2018-06-20 16:19:53 +01:00
John Cupitt
cb76ffb0bd
break quantise out to a separate file
...
slightly simpler reference and memory handling too
2018-06-20 15:38:33 +01:00
John Cupitt
35b4a1a3b5
fix mem leak in pngsave
...
and some reformatting and changelog notes
2018-06-20 14:20:22 +01:00
John Cupitt
a3780a761e
Merge pull request #1009 from felixbuenemann/8bit-png-quantization-support
...
8-Bit PNG Quantization Support
2018-06-20 13:09:17 +01:00
Felix Bünemann
1abc5f901a
Add palette flag to trigger pngsave quantisation
...
and tweak docstrings.
2018-06-19 22:41:40 +02:00
Felix Bünemann
1e68b3a486
Rename pngsave colors/colours, quantize/quantise
2018-06-19 21:32:44 +02:00
Felix Bünemann
c63d7f7373
Change default PNG quantization quality to 100
...
and improve parameter description.
2018-06-19 09:19:43 +02:00
Felix Bünemann
d9d2f7b89a
Add 8bpp PNG quantization support
...
This adds support for saving 8-Bit one band palette based PNG images
with palette based alpha channel (often called PNG8+Alpha).
The image is first converted to sRGBA and then quantized using
libimagequant controlled by the colors, Q and dither params.
2018-06-18 02:22:46 +02:00
Felix Bünemann
b5531cf1ed
Add libimagequant detection to configure
2018-06-18 00:57:18 +02:00