Comments (10)
The original image contains Display P3
color profile. The result image doesn't contain it.
The fast_image_resize
knows nothing about color profiles or color spaces. It works with raw pixel values.
If you want to get correct colors, you should at least add the color profile from the source image-file into the result image-file.
Ideally, you should convert the source pixels to a linear color space before resizing, and convert them back after resizing (read more)
from fast_image_resize.
can you suggest library for do this ?
from fast_image_resize.
Honestly, I don't see any difference in the color of these images on my computer.
from fast_image_resize.
But I see that you used Nearest algorithm to resize the image.
That is the result of using Convolution(Filter::Lanczos3)
algorithm:
from fast_image_resize.
And if you also resize the image in linear color space (with mapper that may be created with help of create_srgb_mapper()
), the result in dark areas will be even better (look at the grass under the bull):
from fast_image_resize.
- Your result with Nearest algorithm
- Resize with Convolution algorithm in sRGB color space
- Resize with Convolution algorithm in linear color space
from fast_image_resize.
I opened the original image in my browser and now I see the color difference. I think my default image viewer doesn't support color profiles. And that's the reason why I didn't see the difference at first.
from fast_image_resize.
can you suggest library for do this ?
Sorry, I can't suggest any library right now. I haven't had to work with color profiles yet.
from fast_image_resize.
ok, thank you.
from fast_image_resize.
The first crate I found on google was https://github.com/kornelski/rust-lcms2.
from fast_image_resize.
Related Issues (20)
- Allow passing an immutable slice to Image::from_slice_u8 HOT 2
- num-traits error HOT 2
- Preparation of a large number of images in a loop HOT 6
- f32 example HOT 2
- no gaussian kernel HOT 7
- Equivalent to OpenCV cv2.INTER_AREA? HOT 2
- Floating point exception during convolutional downscale (Lanczos) HOT 4
- Are the examples updated to the last version? HOT 5
- Invalid buffer length issue HOT 1
- Support for `F32x2` `F32x3` & `F32x4`? HOT 9
- how do you apply a crop on the target buffer? HOT 4
- Equivalent to OpenCV `cv2.INTER_LINEAR` HOT 12
- Inaccurate colors appear in the corners of the image after scaling HOT 10
- resize-rgba8-image example uses a no longer supported function. HOT 1
- the lasted resized example cannot be compiled correctly HOT 2
- Opt-in `std::simd` support HOT 4
- Doesn't support zoom. HOT 4
- Not as fast as expected ? HOT 2
- Running the lib on android (`aarch64`) is `~7x slower` then running on windows (`x86_64`). HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fast_image_resize.