Any way to get LZW compression on figure outputs to a tiff?

조회 수: 6 (최근 30일)
Mark
Mark 2013년 6월 4일
댓글: Walter Roberson 2017년 2월 13일
I am saving a sequence of tiff files using print(gcf,'name','-dtiff')
The files that are output are compressed (compared to -dtiffn), but not nearly as much as could be done with LZW or similar: dtiffn: 5.8MB dtiff: 2.8MB LZW (external): 0.2MB
I know there is an LZW option for imwrite, but I'm trying to print figures. Any suggestions?
Thanks
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 6월 4일
I am not certain here: are you asking to run LZW on the generated .tiff file, or are you asking that the .tiff file use LZW as its internal compression?
Mark
Mark 2013년 6월 4일
I guess it's moot after trying the PNG format. It's the smallest file of all. Thx

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2013년 6월 4일
Don't bother. I don't know anyone who uses that anymore. Not many used it even before, when the patent was in force (patent has since expired). You should use PNG format now. Also, see export_fig ( http://www.mathworks.com/matlabcentral/fileexchange/ to save figures as images.
  댓글 수: 1
Mark
Mark 2013년 6월 4일
Thanks, I appreciate the suggestion. Did not realize PNG was so good!

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Constantino Carlos Reyes-Aldasoro
Yes, PNG is very good, however, some journals require figures to be submitted as TIFFs with LZW compression, any ideas?
  댓글 수: 1
Walter Roberson
Walter Roberson 2017년 2월 13일
After you have saved the image to a tiff one way, you can go back and imread() the tiff and then write it out again using the 'compression', 'lzw' option.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Image Data에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by