mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Remove CMYK from the changelog for now
This commit is contained in:
parent
ab01858bb2
commit
79256ac55d
2 changed files with 11 additions and 14 deletions
|
|
@ -15,7 +15,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/):
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
- Support VFS for preset previewers that rely on external commands ([#3477])
|
- 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
|
### Fixed
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use image::{
|
use image::{ColorType, DynamicImage, GrayAlphaImage, GrayImage, ImageDecoder, RgbImage, RgbaImage, metadata::Cicp};
|
||||||
ColorType, DynamicImage, GrayAlphaImage, GrayImage, ImageDecoder, RgbImage, RgbaImage,
|
use moxcms::{CicpColorPrimaries, ColorProfile, DataColorSpace, Layout, TransferCharacteristics, TransformOptions};
|
||||||
metadata::Cicp,
|
|
||||||
};
|
|
||||||
use moxcms::{
|
|
||||||
CicpColorPrimaries, ColorProfile, DataColorSpace, Layout, TransferCharacteristics,
|
|
||||||
TransformOptions,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub(super) struct Icc;
|
pub(super) struct Icc;
|
||||||
impl Icc {
|
impl Icc {
|
||||||
|
|
@ -63,10 +57,13 @@ impl Icc {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn requires_transform(profile: &ColorProfile) -> bool {
|
fn requires_transform(profile: &ColorProfile) -> bool {
|
||||||
!(profile.color_space == DataColorSpace::Cmyk
|
if profile.color_space == DataColorSpace::Cmyk {
|
||||||
|| profile.cicp.is_some_and(|c| {
|
return false;
|
||||||
c.color_primaries == CicpColorPrimaries::Bt709
|
}
|
||||||
&& c.transfer_characteristics == TransferCharacteristics::Srgb
|
|
||||||
}))
|
profile.cicp.is_none_or(|c| {
|
||||||
|
c.color_primaries != CicpColorPrimaries::Bt709
|
||||||
|
|| c.transfer_characteristics != TransferCharacteristics::Srgb
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue