save a cmyk image in jpeg

 Respuesta aceptada

John D'Errico
John D'Errico el 19 de Ag. de 2025

0 votos

No. Imwrite cannot save a CMYK image to JPG. However, it can save a 4 channel image to a PNG format. Then I would open the image in Photoshop, or your favorite image editing tool, and save it to a JPG format. An extra step, but it should be workable. A quick check online (since it has been 25+ years since I used Photoshop) did tell me that Photoshop can save an image as a CMYK JPG file.

4 comentarios

Yiftach
Yiftach el 20 de Ag. de 2025
thanks ! - indeed, this is what i have been doing all along - saving to TIFF CMYK and then using Photoshop for JPEG. however, i now need to do this on 100 of such files - could be done using 'Action' but thought someone might have done it in Matlab. btw - not sure why didn't mathworks do it for such a common format..
John D'Errico
John D'Errico el 20 de Ag. de 2025
Ugh. I feel for you, because even if you do bite the bullet and do it manually, next week the list will have multiplied into 1000 files. There probably is some scripting solution, but if there is, @Walter Roberson is the one far more likely to know if it is possible. You might try asking on an image processing forum. Good luck.
Yiftach
Yiftach el 20 de Ag. de 2025
thanks !!
Walter Roberson
Walter Roberson el 20 de Ag. de 2025
Sorry, I do not know very much about scripting for Windows.

Iniciar sesión para comentar.

Más respuestas (1)

Walter Roberson
Walter Roberson el 19 de Ag. de 2025

0 votos

Saving jpeg with CMYK is not supported by imwrite() or any other Mathworks supported function.
There just might happen to be appropriate code in the File Exchange, but I would not count on it.

Categorías

Productos

Versión

R2024a

Etiquetas

Preguntada:

el 19 de Ag. de 2025

Comentada:

el 20 de Ag. de 2025

Community Treasure Hunt

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

Start Hunting!

Translated by