Skip to content

How to automatically calculate TIFF tag RowsPerStrip? #8410

Answered by radarhere
CODED1NG asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, this change came from #7654 after a user requested the ability to set the value in #6607

The simple solution would be to add del metaData[278] to your code.

        # Open & Save Metadata to newly compressed image
        imgNeedsMetaData = TiffImageFile(filePath)
        imgNeedsMetaData.load()
        del metaData[278]
        imgNeedsMetaData.save(filePath, tiffinfo=metaData)

This is the number of the RowsPerStrip tag.

ROWSPERSTRIP = 278

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@CODED1NG
Comment options

Answer selected by CODED1NG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants