18

I needed to convert an image to PNG format so I have a transparent background. Unfortunately, CMYK isn't supported by the PNG format. I just wanted an image with a clear background so I can have that image alone in my design. I chose CMYK because I'm currently designing a book to print. Help.

  • 2
    First thing, talk to the person who will print it. Do they prefer CMYK or RGB? Will you create a digital version, too? CMYK is inferior on screen, you can't just convert it back. In my experience it's best to stay RGB as long as possible. Only convert to CMYK if you know what you're doing (Color Profile). However, if you need transparency use either TIF or EPS format, with either alpha channel or a vector cutout path. – AAGD Oct 2 at 12:43
  • 10
    Please, pay for a designer to do the prepress job. It will save you money. This is only the tip of the iceberg where it is pretty obvious that this project is unknown to you. Do NOT convert the file to CMYK either. Leave it as RGB and let the designer do a proper conversion for the media it will be printed on. – Rafael Oct 2 at 15:33
  • 1
    Hack alert: one greyscale PNG for each channel in CMYK would work but will be a major headache for anybody receiving it. – Joshua Oct 2 at 21:05
  • 2
    It's worth pointing out that RGB and CMYK are arithmetically interchangeable color models. The often-associated sRGB and SWOP color gamuts are not interchangeable (after conversion you will end up with channel values less than 0 or greater than 1). – MooseBoys Oct 3 at 4:26
  • 2
    @slebetman rgb(0, 0, 1) (assuming you mean 0-255 scale) is exactly cmyk(1, 1, 0, 0). The fact that a color point is "impossible to print" just means that in the gamut of the printer, the color point would be something like cmyk(1.2, 1.1, 0, 0). – MooseBoys Oct 3 at 18:26
37

Why?

Because PNG is a lossless raster image format developed for the web, and ultimately for display screens which are RGB.

However the format was never intended or designed to be a print format, and therefore doesn't need to support CMYK colour, and so it's entirely the wrong format to use for CMYK printing - i.e printing where separations are required for making CMYK printing plates/screens, such as in lithography, or screen printing, etc.

The de facto standard raster image format for CMYK printing is TIFF.

Note: Even though TIFF does support transparency, there's rarely a need for that when using it for CMYK printing. Everything that is white in a CMYK image is non-printing, because white ink is not used in that printing process.

  • 2
    A publishing tool may respect the alpha channel for compositing prior to printing. So when you place a CMYK white over a non-white CMYK background, the program will remove the non-white underlayer, unless the over-layer has transparency. – Yakk Oct 2 at 14:03
  • 7
    "Everything that is white in a CMYK image is non-printing, because white ink is not used in that printing process." <-- is it just white or is it the same color as the paper? That is, if the paper is red, will the printer still try to print red and ignore white? Even when the paper color is defined? – Ismael Miguel Oct 2 at 14:45
  • 5
    @IsmaelMiguel If the physical paper media is red, then the inks will overprint on top of the red paper, which will show through the inks, shifting all the colours towards red because CMYK inks are semi-transparent. Where no ink is applied (in white areas) only the bare red paper will show through. So basically everything will be red/reddish coloured. It is possible to print on coloured paper by printing with an opaque white ink before overprinting with CMYK - but that's not a regular part of the CMYK printing process. – Billy Kerr Oct 2 at 15:02
  • 4
    @IsmaelMiguel No. That's not what this question is about. It's about PNG images and CMYK support, with a side note on transparency. The OP mentions nothing about red paper.. – Billy Kerr Oct 2 at 15:16
  • 1
    Requoting the portion of your answer: "Everything that is white in a CMYK image is non-printing, because white ink is not used in that printing process.". Basically, you state that everything white is assumed as being transparent. Is it related to the paper color or not at all? (Yes, I do understand that there's no white cartbridge.) If I print with a paper of another color, will that same color be transparent as well as white? (I've noticed that some printers can be set to other paper colors). I've simply used red as an example. – Ismael Miguel Oct 2 at 15:22
15

Broadly speaking there are two schools of thought on file-format design.

One is that you should have lots of options to give lots of different users what they want. The problem with this approach is that compatibility becomes a problem. Just because a program advertises support for tiff files doesn't mean it can open your particular tiff file.

The other is that you should keep the number of options for the core functionality down, so that a relatively simple reader can read all files in the format. This is the approach that PNG took. It was designed as an image-format for the web in the late 90s and the set of options for the core functionality reflected that. The color options were RGB (with an optional alpha channel), palleted with a RGB based pallette and greyscale (trivially converted to RGB).

Yes PNG does have options for specifying specific RGB colorspaces for those who are picky about their colors, but simple decoders that ignore those aren't really any worse off than if the color space information had never been stored at all, so it doesn't break the basic compatibility.

The question of CMYK is actually explicitly addressed in RFC 2083

There is no support for CMYK or other unusual color spaces. Again, this is in the name of promoting portability. CMYK, in particular, is far too device-dependent to be useful as a portable image representation.

  • 2
    This rationale, and the quote at the end, is particularly strong when you realise that the "P" in "PNG" stands for "Portable". – IMSoP Oct 3 at 12:14
5

Simply, the PNG format has no support for any other color mode than RGB. There is no way around this. Use TIFF

  • 3
    Strictly speaking, this is not true. PNG also supports grayscale (with any power of 2 channel width from 1-16 bits), as well as an indexed color mode that technically may not be true RGB depending on the exact colors loaded into the palette (though the colors must be representable in an RGB color space). Grayscale usage with PNG is pretty rare, but indexed usage is actually rather common for images on the web that have limited color gamuts. – Austin Hemmelgarn Oct 2 at 15:44
  • 1
    @AustinHemmelgarn well i admit grayscale but indexed mode is just a subset of RGB – joojaa Oct 2 at 16:29
  • Usually it's a subset of RGB, but it can use any of the other color modes though for the palette, though it would have to be a very odd image for there to be a benefit to using a grayscale palette in indexed mode. – Austin Hemmelgarn Oct 2 at 18:53
  • 4
    Nope, the pallette in a PNG is always in RGB with 8 bits per channel. There is also an optional alpha channel for the pallete but that is stored in a seperate chunk. – Peter Green Oct 2 at 19:47
1

Look at it this way: PNG was developed as a replacement for GIF and so generally to be used in digital work, which means RGB (screens use RGB). And yes PNG is limited to RGB. While CMYK is a print-specific model available in JPG**, TIFF, PSD and some other formats. Read:

  • 1
    PNG is not limited to RGB, it also supports monochromatic grayscale colorspaces, as well as an indexed color mode that's not technically a true RGB mode. The format also technically could be extended to support other color spaces, it's just that there's no incentive to do so given the current primary applications of PNG. – Austin Hemmelgarn Oct 2 at 15:47
0

The issue has not a thing to do with color spaces. It is about transparency...or alpha. Use BMP format. You cannot readily composite using chromakey or alpha blending with any other format on Windows based machines.

  • Welcome to GD.SE - Please look through tour to get a sense of what our community is about. Then look over How to Ask and How to Answer a question to see what makes a good query here, and how best to frame it. You state: "...You cannot readily composite using chromakey or alpha blending with any other format..." (emphasis mine) - I suspect this may not be accurate - but just in case, could you please cite some references for this to help all of us learn? If you are correct in this assertion, it would be super-helpful for many people to learn about this - thanks! – GerardFalla Oct 8 at 17:03

protected by joojaa Oct 7 at 17:53

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.