Changeset 13657
- Timestamp:
- 02/01/08 16:43:10 (3 months ago)
- Files:
-
- trunk/autotest/gcore/data/sasha.tif (added)
- trunk/autotest/gcore/tiff_write.py (modified) (2 diffs)
- trunk/autotest/pymod/gdaltest.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/autotest/gcore/tiff_write.py
r13410 r13657 364 364 return ut.testCreateCopy() 365 365 366 ############################################################################### 367 # Read JPEG Compressed YCbCr subsampled image. 368 369 def tiff_write_12(): 370 371 drv = gdal.GetDriverByName( 'GTiff' ) 372 md = drv.GetMetadata() 373 if string.find(md['DMD_CREATIONOPTIONLIST'],'JPEG') == -1: 374 return 'skip' 375 376 ut = gdaltest.GDALTest( 'GTiff', 'sasha.tif', 3, 31952 ) 377 378 return ut.testOpen() 379 380 ############################################################################### 381 # Write JPEG Compressed YCbCr subsampled image. 382 383 def tiff_write_13(): 384 385 drv = gdal.GetDriverByName( 'GTiff' ) 386 md = drv.GetMetadata() 387 if string.find(md['DMD_CREATIONOPTIONLIST'],'JPEG') == -1: 388 return 'skip' 389 390 ut = gdaltest.GDALTest( 'GTiff', 'sasha.tif', 3, 17255, 391 options = [ 'TILED=YES', 392 'COMPRESS=JPEG', 393 'PHOTOMETRIC=YCBCR', 394 'JPEG_QUALITY=31' ] ) 395 396 return ut.testCreateCopy( skip_preclose_test=1 ) 397 366 398 def tiff_write_cleanup(): 367 399 gdaltest.tiff_drv = None … … 381 413 tiff_write_10, 382 414 tiff_write_11, 415 tiff_write_12, 416 tiff_write_13, 383 417 tiff_write_cleanup ] 384 418 trunk/autotest/pymod/gdaltest.py
r13620 r13657 340 340 341 341 def testCreateCopy(self, check_minmax = 1, check_gt = 0, check_srs = None, 342 vsimem = 0, new_filename = None, strict_in = 0 ): 342 vsimem = 0, new_filename = None, strict_in = 0, 343 skip_preclose_test = 0 ): 344 343 345 if self.testDriver() == 'fail': 344 346 return 'skip' … … 367 369 return 'fail' 368 370 369 if self.band > 0 :371 if self.band > 0 and skip_preclose_test == 0: 370 372 bnd = new_ds.GetRasterBand(self.band) 371 373 if self.chksum is not None and bnd.Checksum() != self.chksum: … … 395 397 bnd = new_ds.GetRasterBand(self.band) 396 398 if self.chksum is not None and bnd.Checksum() != self.chksum: 397 post_reason( 'Did not get expected checksum on reopened file.' ) 398 return 'fail' 399 post_reason( 'Did not get expected checksum on reopened file.\n' 400 ' Got %d instead of %d.' \ 401 % (bnd.Checksum(), self.chksum) ) 402 return 'fail' 403 399 404 got_minmax = bnd.ComputeRasterMinMax() 400 405 if got_minmax != minmax and check_minmax:
