HomeFreeBSD

graphics/dssim: fix build on big-endian

Description

graphics/dssim: fix build on big-endian

Backport https://gitlab.com/kornelski/load_image/-/commit/e8f31164b97ba7b88ff881e8903ec13e5ddaec44

error[E0599]: the method to_image exists for mutable reference &mut [RGB<u8>], but its trait bounds were not satisfied

--> /wrkdirs/usr/ports/graphics/dssim/work/dssim-3.2.4/cargo-crates/load_image-3.0.1/src/jpeg.rs:39:55
 |

39 | PixelFormat::RGB24 => pixels.as_rgb_mut().to_image(profile, width, height, true, meta),

 |                                                       ^^^^^^^^ method cannot be called on `&mut [RGB<u8>]` due to unsatisfied trait bounds
 |
::: /wrkdirs/usr/ports/graphics/dssim/work/dssim-3.2.4/cargo-crates/rgb-0.8.34/src/lib.rs:72:1
 |

72 | pub struct RGB<ComponentType> {

| ----------------------------- doesn't satisfy `rgb::RGB<u16>: pixel_format::LcmsPixelFormat`
|

note: trait bound rgb::RGB<u16>: pixel_format::LcmsPixelFormat was not satisfied

--> /wrkdirs/usr/ports/graphics/dssim/work/dssim-3.2.4/cargo-crates/load_image-3.0.1/src/convert.rs:68:25
 |

66 | impl<T> ToSRGBImage for [T]

|         -----------     ---

67 | where T: LcmsPixelFormat + LcmsPixelConversion,
68 | T::Converted: LcmsPixelFormat + Default,

|                         ^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here

69 | T::ConvertedOpaque: LcmsPixelFormat + Default,

|                               ^^^^^^^^^^^^^^^ unsatisfied trait bound introduced here
= help: items from traits can only be used if the trait is implemented and in scope

note: convert::ToSRGBImage defines an item to_image, perhaps you need to implement it

--> /wrkdirs/usr/ports/graphics/dssim/work/dssim-3.2.4/cargo-crates/load_image-3.0.1/src/convert.rs:43:1
 |

43 | pub trait ToSRGBImage {

| ^^^^^^^^^^^^^^^^^^^^^

Details

Provenance
pkubajAuthored on Jul 31 2024, 8:57 AM
Parents
R11:f7e90e1070aa: databases/keydb: disable on powerpc
Branches
Unknown
Tags
Unknown