Sub topic 6
Choosing an image file format
This chapter assumes you can open the Output properties tab and render a still with F12. It also assumes you know what an alpha channel (a per-pixel transparency value) is. The file format decides how much of what Blender calculated survives on disk. You can re-render a bad sample count, but a render saved as an 8-bit JPEG has already lost data that you can't get back.
Where the setting lives
Open Output properties, then the Output panel. The File Format menu and the settings under it apply to every frame Blender writes. The same settings are available from Python as scene.render.image_settings.
Three kinds of settings sit under the format menu:
- Color is BW (grayscale), RGB, or RGBA. RGBA adds the alpha channel.
- Color Depth is the number of bits stored per channel.
- Compression or Quality controls how small the file gets and whether detail is lost.
Not every format offers every option. When a control is missing, the format doesn't support it.
Lossless, lossy, and scene-linear
Two properties of a format matter more than the others.
Lossless or lossy. A lossless format stores every pixel exactly, and compression only changes file size and write time. A lossy format discards detail to get smaller files. JPEG is lossy. Its Quality slider trades size against visible artifacts such as blocky edges and smeared color gradients.
Display-referred or scene-linear. Blender renders in a scene-linear color space, where values can exceed 1.0 (for example a bright lamp or a sun highlight). Formats such as PNG and JPEG store values after the view transform (Filmic, AgX, or Standard) has squeezed them into the 0 to 1 range for a monitor. That is called display-referred. OpenEXR can store the original floating-point values with no clipping, so you can still change exposure and color grading afterward.
The common formats compared
| Format | Compression | Typical depths | Alpha | Best use |
|---|---|---|---|---|
| PNG | Lossless | 8 or 16 bit | Yes | Final stills, web graphics, image sequences you plan to encode to video |
| JPEG | Lossy | 8 bit | No | Quick previews, small files for sharing |
| OpenEXR | Lossless (some codecs lossy) | 16 bit half float or 32 bit float | Yes | Compositing, color grading, anything needing the full dynamic range |
| OpenEXR MultiLayer | Same as OpenEXR | Half or float | Yes | Saving all render passes in one file per frame |
| TIFF | Lossless options | 8 or 16 bit | Yes | Handoff to print or photo software |
| WebP | Lossy or lossless | 8 bit | Yes | Small web images |
Other formats exist (BMP, Targa, HDR, DPX, Cineon, JPEG 2000). They are mostly for legacy pipelines or specific studio requirements. If a client doesn't ask for one by name, you usually don't need it.
PNG
PNG is the sensible default for final stills. It is lossless and supports alpha. Its Compression setting is a percentage. A higher value gives a smaller file and a slower write, and the pixels are identical either way. For an image sequence that will become a video, a low or moderate value keeps frame writes quick.
Choose 16-bit depth when the image has smooth gradients, such as a sky or a soft vignette. 8-bit storage has only 256 levels per channel, and long gradients can show visible bands. Many viewers and web pages don't take advantage of 16-bit, so use it when you plan to edit the file further.
JPEG
JPEG is fine for checking composition and sharing a draft. Don't use it as an intermediate for later work. It has no alpha channel, so Blender won't let you select RGBA. Every re-save also discards more detail. Set Quality around 90 for a good balance and avoid values near 100, which give large files with little visible benefit.
OpenEXR
OpenEXR is the format to choose when the image will be processed after rendering. It keeps values above 1.0 and stores colors without display clipping. It has these settings:
- Float (Half) stores 16 bits per channel and is enough for almost all work. Float (Full) stores 32 bits and doubles the file size. Use it for data such as depth or position passes where precision matters.
- Codec chooses the compression method. ZIP is lossless and a safe default. PIZ is lossless and often smaller on grainy renders. DWAA and DWAB are lossy and small, but you shouldn't use them for data passes.
- OpenEXR MultiLayer writes every enabled render pass (Combined, Z, Normal, and so on) into a single file. It is the right choice when you plan to composite elsewhere, such as in Blender's compositor or another application.
Most image viewers can't display EXR correctly, and browsers can't open it. Treat EXR as a working format and export a PNG or JPEG for delivery.
Color management and the format
When you save PNG or JPEG, Blender applies the scene's view transform, so the file looks like the render window. For EXR, it writes the linear data instead. The image settings have a Color Management option, Follow Scene or Override. Leave it on Follow Scene unless you have a reason to bake a different look into one output.
Transparent backgrounds
A transparent background needs three things to line up:
- Film > Transparent is enabled in the Render properties, so the world background is written as alpha.
- The color mode is RGBA.
- The file format supports alpha (PNG, EXR, TIFF, or WebP).
If you save as JPEG, the transparency is lost. If you leave the color mode at RGB, the transparent areas are filled with a solid color. This is a common cause of "my background isn't transparent" questions, and the chapter on troubleshooting covers it again.
Choosing a format: a decision path
The diagram summarizes the decisions in order. Answer the first question that applies to your situation.
Setting the format from Python
The same settings are exposed through scene.render.image_settings. The script below configures a PNG with transparency and 16-bit color, saves a still, and then switches to half-float OpenEXR and saves a second file. Run it from the Scripting workspace in a scene that has a camera.
import bpy
scene = bpy.context.scene
img = scene.render.image_settings
# Transparent background so the alpha channel carries data
scene.render.film_transparent = True
# 1. PNG, RGBA, 16 bit
img.file_format = 'PNG'
img.color_mode = 'RGBA'
img.color_depth = '16'
img.compression = 15 # 0-100, affects file size and speed only
scene.render.filepath = '//renders/still_png.png'
bpy.ops.render.render(write_still=True)
# 2. OpenEXR, RGBA, half float, ZIP compression
img.file_format = 'OPEN_EXR'
img.color_mode = 'RGBA'
img.color_depth = '16' # '16' is half float, '32' is full float
img.exr_codec = 'ZIP'
scene.render.filepath = '//renders/still_exr.exr'
bpy.ops.render.render(write_still=True)Set file_format before the other properties. Changing the format can reset or invalidate options such as color depth, which is why the script sets color_mode and color_depth again after each switch. If an assignment raises an error about an enum value, the current format doesn't support that value.
For JPEG, set img.file_format = 'JPEG', img.color_mode = 'RGB', and img.quality = 90.
Formats for animation
For an image sequence, Blender writes one file per frame. Your choice has more consequences than for a single still:
- File size multiplies. A 16-bit PNG at 4K can be several megabytes per frame, so a 240-frame sequence adds up quickly.
- Write speed matters. Heavy compression slows down each frame, and it matters most with fast engines such as EEVEE.
- Lossless is safer for intermediates. If you will encode the sequence to video later, use PNG or EXR. Encoding from JPEG frames compounds the loss, because the video codec compresses them again.
Video formats such as FFmpeg appear in the same File Format menu, but they write a single video file rather than images. The chapter on rendering straight to video covers them.
Common mistakes
- Saving a composite source as PNG. Highlights are clipped, so you can't recover them later. Use EXR.
- Choosing JPEG and expecting transparency. JPEG has no alpha channel.
- Using a lossy EXR codec for data passes. DWAA and DWAB can alter values in depth and normal passes.
- Using 32-bit float for everything. It doubles file size and rarely improves visible quality over half float.
- Opening an EXR in a normal image viewer and judging the colors. The viewer may show it without the proper color transform, so open it in Blender or a viewer that supports linear data.
Exercise
You need to render a logo animation with a transparent background. You will encode it to video later and want the option to correct colors in the compositor first. Which file format, color mode, and color depth would you choose for the frames, and which Render property must also be enabled?
Show answer
Use OpenEXR (or PNG if no color correction on highlight data is needed), with color mode RGBA and half-float (16-bit) depth. Enable Film > Transparent in the Render properties so the background is written as alpha. EXR keeps the values above 1.0, which gives the compositor the most room. Because the frames are intermediates, they should be lossless. JPEG would fail because it has no alpha channel.
Exercise
A teammate sets the format to PNG, selects RGB, and enables Film > Transparent, but the exported image has a solid dark background. What is wrong, and how do you fix it?
Show answer
RGB has no alpha channel, so the transparent pixels are filled with a solid color on save. Change the color mode to RGBA. The format already supports alpha, so no other change is needed.