1
$\begingroup$

I can only see two options: 8 bit and 16 bit. Saving it as 16 bit turns smooth gradients into ugly steps, so I would like to save it with a 32 (or 24, I don't really need the alpha) bit depth. How do I do this? I know that the information is in the render, as the render window shows no such step artifacts.

Image for clarity: enter image description here

$\endgroup$
2
$\begingroup$

The Portable Network Graphics (PNG) format doesn't support more than 16-bit per sample in the color channel. You can use a format such as OpenEXR or Radiance HDR if you need 32-bit per sample in the color channel.

Section 4.1 Images explains this (emphasis mine):

The reference image, which only exists conceptually, is a rectangular array of rectangular pixels, all having the same width and height, and all containing the same number of unsigned integer samples, either three (red, green, blue) or four (red, green, blue, alpha). The array of all samples of a particular kind (red, green, blue, or alpha) is called a channel. Each channel has a sample depth in the range 1 to 16, which is the number of bits used by every sample in the channel. Different channels may have different sample depths. The red, green, and blue samples determine the intensities of the red, green, and blue components of the pixel's colour; if they are all zero, the pixel is black, and if they all have their maximum values (2sampledepth-1), the pixel is white. The alpha sample determines a pixel's degree of opacity, where zero means fully transparent and the maximum value means fully opaque. In a three-channel reference image all pixels are fully opaque. (It is also possible for a four-channel reference image to have all pixels fully opaque; the difference is that the latter has a specific alpha sample depth, whereas the former does not.) Each horizontal row of pixels is called a scanline. Pixels are ordered from left to right within each scanline, and scanlines are ordered from top to bottom. A PNG encoder may transform the source image directly into a PNG image, but conceptually it first transforms the source image into a reference image, then transforms the reference image into a PNG image. Depending on the type of source image, the transformation from the source image to a reference image may require the loss of information. That transformation is beyond the scope of this International Standard. The reference image, however, can always be recovered exactly from a PNG datastream.

Section 11.2.2 IHDR Image Header explains precisely what bit depths are allowed depending on the type of information that is stored.

Bit depth is a single-byte integer giving the number of bits per sample or per palette index (not per pixel). Valid values are 1, 2, 4, 8, and 16, although not all values are allowed for all colour types. See 6.1: Colour types and values.

Colour type is a single-byte integer that defines the PNG image type. Valid values are 0, 2, 3, 4, and 6.

Bit depth restrictions for each colour type are imposed to simplify implementations and to prohibit combinations that do not compress well. The allowed combinations are defined in Table 11.1.

Table 11.1 — Allowed combinations of colour type and bit depth
PNG image type       | Colour type | Allowed bit depths | Interpretation
Greyscale            | 0           | 1, 2, 4, 8, 16     | Each pixel is a greyscale sample
Truecolour           | 2           | 8, 16              | Each pixel is an R,G,B triple
Indexed-colour       | 3           | 1, 2, 4, 8         | Each pixel is a palette index; a PLTE chunk shall appear.
Greyscale with alpha | 4           | 8, 16              | Each pixel is a greyscale sample followed by an alpha sample.
Truecolour with alpha| 6           | 8, 16              | Each pixel is an R,G,B triple followed by an alpha sample.
$\endgroup$
  • $\begingroup$ Just to add, Windows will report an 8bit PNG as 32bit depth and 16bit PNG as 64bit depth. Whereas most programs, Blender included, are referring to colour bit depth not pixel bit depth. $\endgroup$ – rob Sep 26 '19 at 11:42
  • 2
    $\begingroup$ @rob That is true and highly confusing. It's really uncommon to use anything other than the bit depth per color channel. I don't think I've ever seen the bit depth reported like Windows does anywhere else. $\endgroup$ – Robert Gützkow Sep 26 '19 at 12:02
0
$\begingroup$

Color Depth refers to number of bits per channel. So when saving without the alpha channel (RGB) with Color Depth set to 16, it will total up to 48 bits of color information per pixel.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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