Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/jpegli/encode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -783,8 +783,11 @@ void jpegli_set_colorspace(j_compress_ptr cinfo, J_COLOR_SPACE colorspace) {
default:
JPEGLI_ERROR("Unsupported jpeg colorspace %d", colorspace);
}
// Adobe marker is only needed to distinguish CMYK and YCCK JPEGs.
cinfo->write_Adobe_marker = TO_JXL_BOOL(cinfo->jpeg_color_space == JCS_YCCK);
// Adobe marker is needed to distinguish CMYK, YCCK and RGB(XYB) JPEGs.
cinfo->write_Adobe_marker =
TO_JXL_BOOL((cinfo->jpeg_color_space == JCS_CMYK ||
cinfo->jpeg_color_space == JCS_YCCK ||
cinfo->jpeg_color_space == JCS_RGB));
if (cinfo->comp_info == nullptr) {
cinfo->comp_info =
jpegli::Allocate<jpeg_component_info>(cinfo, MAX_COMPONENTS);
Expand Down