| | 586 | return 'success' |
|---|
| | 587 | |
|---|
| | 588 | ############################################################################### |
|---|
| | 589 | # Test the write of a pixel-interleaved image with NBITS = 7 |
|---|
| | 590 | |
|---|
| | 591 | def tiff_write_19(): |
|---|
| | 592 | |
|---|
| | 593 | src_ds = gdal.Open( 'data/contig_strip.tif' ) |
|---|
| | 594 | |
|---|
| | 595 | new_ds = gdaltest.tiff_drv.CreateCopy( 'tmp/contig_strip_7.tif', src_ds, |
|---|
| | 596 | options = [ 'NBITS=7', 'INTERLEAVE=PIXEL' ] ) |
|---|
| | 597 | |
|---|
| | 598 | new_ds = None |
|---|
| | 599 | |
|---|
| | 600 | # hopefully it's closed now! |
|---|
| | 601 | |
|---|
| | 602 | new_ds = gdal.Open( 'tmp/contig_strip_7.tif' ) |
|---|
| | 603 | if new_ds.GetRasterBand(1).Checksum() != src_ds.GetRasterBand(1).Checksum() or \ |
|---|
| | 604 | new_ds.GetRasterBand(2).Checksum() != src_ds.GetRasterBand(2).Checksum() or \ |
|---|
| | 605 | new_ds.GetRasterBand(3).Checksum() != src_ds.GetRasterBand(3).Checksum() : |
|---|
| | 606 | gdaltest.post_reason( 'Didnt get expected checksum on reopened file') |
|---|
| | 607 | return 'false' |
|---|
| | 608 | |
|---|
| | 609 | new_ds = None |
|---|
| | 610 | src_ds = None |
|---|
| | 611 | |
|---|
| | 612 | gdaltest.tiff_drv.Delete( 'tmp/contig_strip_7.tif' ) |
|---|
| | 613 | |
|---|