Closed oumad closed 4 months ago
I finally got a more correct result, but this time I'm using colstodian crate which is built on top of kolor
.
This is the result :
This is the source target for comparison :
The conversion version is a bit lighter than the target, maybe it's some parameter in tonemaping, but at least the colors behave more correctly, almost there !
The conversion code :
fn aces_cg_to_srgb(r:f32,g:f32,b:f32,a:f32) -> [u8; 3] {
let rendered_col = color::acescg(r, g, b);
let params = PerceptualTonemapperParams::default();
let tonemapped: Color<AcesCg,Display> = PerceptualTonemapper::tonemap(rendered_col, params).convert();
let encoded = tonemapped.convert::<EncodedSrgb>();
return encoded.to_u8();
}
Glad to hear you got the result you wanted. Let me know if there are any other issues :)
I'm trying to convert an EXR done in ACES_CG color space to png with encoded BT_709.
The result I'm expecting to get :![toy_car](https://user-images.githubusercontent.com/17836943/202875675-c50883b6-1f3f-494b-b226-4893b24ce412.png)
The actual result I'm getting using my code :![toy_car_BT_709](https://user-images.githubusercontent.com/17836943/202875679-73a8261c-dbd6-49d6-9138-7822f3c34e16.png)
As you can see we lose a lot of nuances in the colors and highlights.
This is the source EXR file : toy_car.zip
And this is the code I'm using for the conversion :