@@ -369,7 +369,9 @@ def test_tiff_write_13():
369369 size = os .stat ('tmp/sasha.tif' ).st_size
370370
371371 gdaltest .tiff_drv .Delete ('tmp/sasha.tif' )
372- assert cs == 17347 or cs == 14445 , 'fail: bad checksum'
372+ assert cs in (17347 , 14445 ,
373+ 14135 , # libjpeg 9e
374+ )
373375
374376 if md ['LIBTIFF' ] == 'INTERNAL' :
375377 # 22816 with libjpeg-6b or libjpeg-turbo
@@ -3309,6 +3311,7 @@ def test_tiff_write_92():
33093311 ds = None
33103312
33113313 ds = gdal .Open ('tmp/tiff_write_92.tif' , gdal .GA_Update )
3314+ assert ds .GetMetadataItem ('JPEG_QUALITY' , 'IMAGE_STRUCTURE' ) == str (quality )
33123315 if jpeg_quality_overview is not False :
33133316 gdal .SetConfigOption ('JPEG_QUALITY_OVERVIEW' , '%d' % jpeg_quality_overview )
33143317 ds .BuildOverviews ('NEAR' , overviewlist = [2 , 4 ])
@@ -4629,11 +4632,11 @@ def test_tiff_write_126():
46294632
46304633 src_ds = gdal .Open ('../gdrivers/data/small_world_400pct.vrt' )
46314634
4632- options_list = [(['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' ], [48788 , 56561 ], [61397 , 2463 , 2454 ], [29605 , 33654 ], [10904 , 10453 ]),
4633- (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'JPEGTABLESMODE=0' ], [48788 , 56561 ], [61397 , 2463 , 2454 ], [29605 , 33654 ], [10904 , 10453 ]),
4634- (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'TILED=YES' ], [48788 , 56561 ], [61397 , 2463 , 2454 ], [29605 , 33654 ], [10904 , 10453 ]),
4635- (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'BLOCKYSIZE=800' ], [48788 , 56561 ], [61397 , 2463 , 2454 ], [29605 , 33654 ], [10904 , 10453 ]),
4636- (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'BLOCKYSIZE=64' ], [48788 , 56561 ], [61397 , 2463 , 2454 ], [29605 , 33654 ], [10904 , 10453 ]),
4635+ options_list = [(['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' ], [48788 , 56561 , 56462 ], [61397 , 2463 , 2454 , 2727 ], [29605 , 33654 , 34633 ], [10904 , 10453 , 10361 ]),
4636+ (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'JPEGTABLESMODE=0' ], [48788 , 56561 , 56462 ], [61397 , 2463 , 2454 , 2727 ], [29605 , 33654 , 34633 ], [10904 , 10453 , 10361 ]),
4637+ (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'TILED=YES' ], [48788 , 56561 , 56462 ], [61397 , 2463 , 2454 , 2727 ], [29605 , 33654 , 34633 ], [10904 , 10453 , 10361 ]),
4638+ (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'BLOCKYSIZE=800' ], [48788 , 56561 , 56462 ], [61397 , 2463 , 2454 , 2727 ], [29605 , 33654 , 34633 ], [10904 , 10453 , 10361 ]),
4639+ (['COMPRESS=JPEG' , 'PHOTOMETRIC=YCBCR' , 'BLOCKYSIZE=64' ], [48788 , 56561 , 56462 ], [61397 , 2463 , 2454 , 2727 ], [29605 , 33654 , 34633 ], [10904 , 10453 , 10361 ]),
46374640 (['COMPRESS=JPEG' ], [49887 , 58937 ], [59311 , 2826 ], [30829 , 34806 ], [11664 , 58937 ]),
46384641 (['COMPRESS=JPEG' , 'INTERLEAVE=BAND' ], [49887 , 58937 ], [59311 , 2826 ], [30829 , 34806 ], [11664 , 58937 ]),
46394642 (['COMPRESS=JPEG' , 'INTERLEAVE=BAND' , 'TILED=YES' ], [49887 , 58937 ], [59311 , 2826 ], [30829 , 34806 ], [11664 , 58937 ]),
0 commit comments