Comments (5)
In version 2.0.0 I added PixelComponentMapper structure that allows you to create colorspace converters for images whose pixels based on u8 and u16 components.
Source and destination images for mapper may have different bit depth of one pixel component. But count of components must be equal. For example, you may convert U8x3
image with sRGB colorspace into U16x3
image with linear colorspace.
In addition, the crate contains functions create_gamma_22_mapper()
and create_srgb_mapper()
to create instance of PixelComponentMapper
that converts images from sRGB or gamma 2.2 into linear colorspace and back.
You may use PixelComponentMapper
to convert image colorspace before and after resizing.
from fast_image_resize.
The current implementation does nothing special with pixel components and knows nothing about color space of image.
The main feature of this crate is the use of SIMD instructions of CPU to speed up image resizing. So it is most likely not possible to simply use closures for pixel transforming. Because this will significantly slow down the resizing.
I'll can try to add support of images with u16 components of pixel (U16
, U16x3
and U16x4
). But I don't promise that I will do it soon.
from fast_image_resize.
It doesn't need to be closures. It can be something based on macros so users can have compile-time optimized paths for common encodings like sRGB
or Adobe RGB
.
Without this the the crate is useless for downscaling u8
component images that are non-linear (100% of u8
component images that are photos, textures etc., for obvious reasons) since the results will be wrong.
I would put a note in the README at least.
from fast_image_resize.
I've added support of U16x3 pixels. For now without optimizations using SIMD.
from fast_image_resize.
v0.8.0
- Added optimisation for convolution of U16x3 images with helps of
SSE4.1
andAVX2
instructions.
from fast_image_resize.
Related Issues (15)
- Add other PixelTypes HOT 8
- Wasm32 support HOT 3
- how does the speed compare with opencv? HOT 14
- resize_with_pad HOT 5
- Bad unsafe is caught by latest rust nightly (rustc 1.70.0-nightly (2eaeb1eee 2023-04-05)) HOT 5
- Crop source slice length does not match destination slice length HOT 3
- 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
- valgrind memcheck detects reads of unitialized memory memory HOT 3
- ImageView::from_buffer returns an error if the provided buffer larger than the minimum required size HOT 1
- LumaA pixels HOT 3
- [BUG] Return zero if the size of the input is equal to the output HOT 1
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.