MATLAB Answers

How to save a copy of an image making sure that the new image header matches the original?

3 views (last 30 days)
Ronney Lovelace
Ronney Lovelace on 14 Feb 2019
Commented: Ronney Lovelace on 14 Feb 2019
I am doing some preprocessing for a coworker that can't get around how I am saving image files.
I read in a .tiff image using: imread('image.tif');
process code.
Then save with: imwrite(cleanImg,strcat(pathDesktop,name,'dark_sub.tiff'),'tif','Compression','none','RowsPerStrip',2048);
This method works with other tools that we have been using in the past, but these files are being read incorrectly by my coworker's python/c tool.
The eaiest path fwd I believe would be to make sure that the header of the saved image matches the header of the readin image.
Is there a defualt way of doing this?
Thank you for your time.

  1 Comment

Ronney Lovelace
Ronney Lovelace on 14 Feb 2019
For additional information:
It would appear the main differense in the headers are in "StripOffsets" - using iminfo(' ');

Sign in to comment.

Answers (0)

Sign in to answer this question.

Products


Release

R2015b