Merge branch '8.10'

This commit is contained in:
John Cupitt 2020-11-03 23:45:17 +00:00
commit 20988977ab
3 changed files with 12 additions and 13 deletions

View File

@ -15,6 +15,7 @@
- fix vips7 webp load [barryspearce] - fix vips7 webp load [barryspearce]
- fix out of bounds exif read in heifload - fix out of bounds exif read in heifload
- fix out of bounds read in tiffload - fix out of bounds read in tiffload
- fix tiffsave region shrink mode [imgifty]
6/9/20 started 8.10.2 6/9/20 started 8.10.2
- update magicksave/load profile handling [kelilevi] - update magicksave/load profile handling [kelilevi]

View File

@ -1629,7 +1629,8 @@ layer_strip_shrink( Layer *layer )
if( vips_rect_isempty( &target ) ) if( vips_rect_isempty( &target ) )
break; break;
(void) vips_region_shrink( from, to, &target ); (void) vips_region_shrink_method( from, to, &target,
layer->wtiff->region_shrink );
below->write_y += target.height; below->write_y += target.height;

View File

@ -374,10 +374,7 @@ class TestForeign:
self.file_loader("tiffload", TIF4_FILE, tiff4_valid) self.file_loader("tiffload", TIF4_FILE, tiff4_valid)
if pyvips.at_least_libvips(8, 5): self.save_load_buffer("tiffsave_buffer", "tiffload_buffer", self.colour)
self.save_load_buffer("tiffsave_buffer",
"tiffload_buffer",
self.colour)
self.save_load("%s.tif", self.mono) self.save_load("%s.tif", self.mono)
self.save_load("%s.tif", self.colour) self.save_load("%s.tif", self.colour)
self.save_load("%s.tif", self.cmyk) self.save_load("%s.tif", self.cmyk)
@ -510,14 +507,14 @@ class TestForeign:
assert a.height == b.height assert a.height == b.height
assert a.avg() == b.avg() assert a.avg() == b.avg()
x = pyvips.Image.new_from_file(TIF_FILE) # just 0/255 in each band, shrink with mode and all pixels should be 0
buf = x.tiffsave_buffer(tile=True, pyramid=True, region_shrink="mean") # or 255 in layer 1
buf = x.tiffsave_buffer(tile=True, pyramid=True, region_shrink="mode") x = pyvips.Image.new_from_file(TIF_FILE) > 128
buf = x.tiffsave_buffer(tile=True, pyramid=True, region_shrink="median") for shrink in ["mode", "median", "max", "min"]:
buf = x.tiffsave_buffer(tile=True, pyramid=True, region_shrink="max") buf = x.tiffsave_buffer(pyramid=True, region_shrink=shrink)
buf = x.tiffsave_buffer(tile=True, pyramid=True, region_shrink="min") y = pyvips.Image.new_from_buffer(buf, "", page=1)
buf = x.tiffsave_buffer(tile=True, pyramid=True, z = y.hist_find(band=0)
region_shrink="nearest") assert z(0, 0)[0] + z(255, 0)[0] == y.width * y.height
@skip_if_no("magickload") @skip_if_no("magickload")
def test_magickload(self): def test_magickload(self):