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

3 visualizaciones (últimos 30 días)
Mark
Mark el 4 de Jun. de 2013
Comentada: Walter Roberson el 13 de Feb. de 2017
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 comentarios
Walter Roberson
Walter Roberson el 4 de Jun. de 2013
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 el 4 de Jun. de 2013
I guess it's moot after trying the PNG format. It's the smallest file of all. Thx

Iniciar sesión para comentar.

Respuesta aceptada

Image Analyst
Image Analyst el 4 de Jun. de 2013
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 comentario
Mark
Mark el 4 de Jun. de 2013
Thanks, I appreciate the suggestion. Did not realize PNG was so good!

Iniciar sesión para comentar.

Más respuestas (1)

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro el 13 de Feb. de 2017
Yes, PNG is very good, however, some journals require figures to be submitted as TIFFs with LZW compression, any ideas?
  1 comentario
Walter Roberson
Walter Roberson el 13 de Feb. de 2017
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.

Iniciar sesión para comentar.

Community Treasure Hunt

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

Start Hunting!

Translated by