How can I to export a CMYK image in the TIFF-format using the PRINT command in MATLAB 7.7 (R2008b)?

8 visualizaciones (últimos 30 días)
I am trying to export a TIFF-file in the CMYK colorspace as follows
surf(peaks);
print -r600 -dtiff -cmyk xxyyzz
However, I have verified that I always get an RGB image from the above call.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 4 de Ag. de 2009
The PRINT command only supports the export of 24-bit TIFF-files. CMYK images require 32-bit depths. Thus the “-cmyk” flag is ignored by the PRINT command.
To workaround this one can export an RGB image and then use Image Processing Toolbox functionalities to convert this RGB image to a CMYK image. Here is an example
surf(peaks);
print -dtiff tempfig.tif %24-bit TIFF
rgb = imread('tempfig.tif');
cform = makecform('srgb2cmyk');
lab = applycform(rgb,cform);
imwrite(lab,'newfig.tif');

Más respuestas (0)

Categorías

Más información sobre Read, Write, and Modify Image en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by