Remove CMYK from the changelog for now

This commit is contained in:
sxyazi 2026-01-02 22:55:23 +08:00
parent ab01858bb2
commit 79256ac55d
No known key found for this signature in database
2 changed files with 11 additions and 14 deletions

View file

@ -15,7 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
### Added
- Support VFS for preset previewers that rely on external commands ([#3477])
- Support 8-bit images in CMYK, CIELAB, and GRAY color spaces ([#3358])
- Support 8-bit images in RGB, CIELAB, and GRAY color spaces ([#3358])
### Fixed

View file

@ -1,12 +1,6 @@
use anyhow::Context;
use image::{
ColorType, DynamicImage, GrayAlphaImage, GrayImage, ImageDecoder, RgbImage, RgbaImage,
metadata::Cicp,
};
use moxcms::{
CicpColorPrimaries, ColorProfile, DataColorSpace, Layout, TransferCharacteristics,
TransformOptions,
};
use image::{ColorType, DynamicImage, GrayAlphaImage, GrayImage, ImageDecoder, RgbImage, RgbaImage, metadata::Cicp};
use moxcms::{CicpColorPrimaries, ColorProfile, DataColorSpace, Layout, TransferCharacteristics, TransformOptions};
pub(super) struct Icc;
impl Icc {
@ -63,10 +57,13 @@ impl Icc {
}
fn requires_transform(profile: &ColorProfile) -> bool {
!(profile.color_space == DataColorSpace::Cmyk
|| profile.cicp.is_some_and(|c| {
c.color_primaries == CicpColorPrimaries::Bt709
&& c.transfer_characteristics == TransferCharacteristics::Srgb
}))
if profile.color_space == DataColorSpace::Cmyk {
return false;
}
profile.cicp.is_none_or(|c| {
c.color_primaries != CicpColorPrimaries::Bt709
|| c.transfer_characteristics != TransferCharacteristics::Srgb
})
}
}