Comments (4)
Would you just use an IndirectArray
before or after applying the dithering algorithm?
from ditherpunk.jl.
I think it's making the output of the dithering algorithm an IndirectArray
, and let the consumers of dither
decide whether they need a collect
. For fixed color dither this should save a bunch of memory I believe.
from ditherpunk.jl.
Sounds good! If a regular array is passed to dither!
, should it be turned into an IndirectArray
too?
This is also a good excuse to add #35. ;)
from ditherpunk.jl.
If a regular array is passed to dither!, should it be turned into an IndirectArray too?
Oh for this you simply can't, because if you create a new array out
for dither!(out, img)
, then it's a different memory.
function f!(out, src)
out = zeros(4, 4)
out .= src
return out # this `out` is not the outside `out`
end
out = zeros(4, 4);
src = rand(4, 4);
f!(out, src)
out == src # false
But it's doable to out .= inner_indirect_array_out
before returning.
from ditherpunk.jl.
Related Issues (20)
- Refactor internals to use lower-precision fixed point numbers
- Documentation error HOT 3
- Add images to readme HOT 1
- Add test image for color quantization HOT 3
- Add package benchmarking
- Limit accumulated error in error diffusion HOT 1
- DitherPunk API planning HOT 8
- Ordered dithering threshold matrices should not start at zero
- Make `invert_map` part of `OrderedDither` struct instead of `binarydither!` kwarg
- Separate inner loop of error diffusion
- Support approximate methods for nearest neighbour color search HOT 2
- Diffuse error in XYZ color space
- Support dithering with tiles HOT 1
- Support dithering with ASCII characters
- FloydSteinberg performance issue for given colormap HOT 2
- error diffusion method errors if requesting more than 255 cmap colors HOT 1
- default dither method? HOT 1
- Refactor dithering to braille
- Add support for quantization of numerical arrays
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 ditherpunk.jl.