Comments (4)
The Pixel trait already having a lot of functions is a reason to avoid adding more. Could you share a bit more on what cases these methods would be needed for, and whether there are alternatives ways to implement those?
from image.
The description mentions an example, which is image math (e.g. taking a Laplacian transform and subtracting that from an image's original content, where we want to preserve alpha but operate on the color channels. These seem like elementary operations that are missing, not exactly extra cruft. Is there another way to perform those operations with comparable performance? If so, why are any of the pixel-wise operations present?
from image.
Yes there are other ways to get as good, if not better, performance. The trait exposes the underlying components and if you don't need to be generic over all implementations of Pixel
you can rely on additional assumptions about the layout. For best performance, you probably want to operate on directly slices and fine-tune your code until it auto-vectorizes.
From looking closer at the PR, it would actually require a breaking change to add these methods because the Pixel
trait isn't sealed. The whole Pixel
trait / generic operations over images probably warrants a more substantial overhaul that includes breaking changes. But it would be a lot of work and I don't have the time to work on that
from image.
Can you give a discrete example of how to accomplish map2_without_alpha
using existing functions only?
from image.
Related Issues (20)
- Invert Alpha method HOT 5
- Switch to the `rgb` crate `v0.9` pixel types and trait. HOT 1
- Format error decoding Png: Invalid PNG signature. When reading png with embedded color profile HOT 4
- Building with default features on macOS requires rustc v1.79 or newer. HOT 7
- Creating a new `PixelImage` type. HOT 6
- Animated WebP's cannot actually be loaded HOT 3
- Animated PNG is decoded incorrectly HOT 1
- Bug-Triage: Should image codec bug reports be moved to their upstream repos?
- The image crate is a top-5 bandwidth consumer on crates.io HOT 1
- Accidentally pushed to main HOT 1
- ImageReader::open and write_to performance issue HOT 8
- Floating point image generates incorrect thumbnail
- DynamicImage:from SubImage<&DynamicImage>::to_image creates Rgba8 instead of L16 HOT 3
- Thread panics on EXR containing NAN HOT 1
- Support for bottom-up and right-to-left images
- SVG image "format could not be determined" HOT 3
- JPG image first two bytes are not an SOI marker HOT 1
- Panic when checking broken tiff file HOT 1
- Freeze when trying to open and save jpg and webp files
- Random crashes when decoding exr file HOT 2
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 image.