Giter Club home page Giter Club logo

colorblendmodes.jl's People

Contributors

kimikage avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

colorblendmodes.jl's Issues

Adding numerical tests

At present, the compositing operations have been verified only with the PNG images for the documents. Strictly speaking, the images contain numerical errors, so additional tests are needed.

3-arg non-allocating/inplace `blend!`?

Hello,

I haven't dug too much into internals, but I'm wondering how hard it would be to write a 3-arg inplace blend! function that the allocating blend uses. I'm mainly looking to blend videos, so reusing the memory from one frame to the next is my goal.

This example might demonstrate what I'm thinking of (where v and v2 are equal lengths, of something like Vector{Matrix{RGB{N0f8}}}):

"allocates only a single frame"
function blendem(v, v2, mode=BlendHardLight)
    img = similar(v[1])
    for i in eachindex(v)
        blend!.(img, v[i], v2[i], mode=mode) # reuses `img`
        save("$i.jpeg", img)
    end
end

"allocates length(v) number of frames"
function blendem2(v, v2, mode=BlendHardLight)
    for i in eachindex(v)
        img = blend.(v[i], v2[i], mode=mode)
        save("$i.jpeg", img)
    end
end

There might be a way to do this without having to change this package, I'm not sure. Does this make any sense (ie will it cut down on allocations?)

Hue blending between a gray and a non-gray

The hue values of grays in HSV etc. is meaningless. The gray hues should be ignored.

julia> blend(HSV(0,0,0), HSV(100,1,0), opacity=0.5)
HSV{Float32}(50.0f0,0.5f0,0.0f0)  # actual
HSV{Float32}(100.0f0,0.5f0,0.0f0) # expected

[RFC] Transferring to JuliaGraphics organization

It's not a big deal that this package is in a personal repository, but I'm a little concerned about its lack of popularity. ๐Ÿ˜ญ

I still have some plans for changing this package, but I don't think we have a problem committing them under the organization. Rather, I think the problem is the dependency chain in the JuliaImages ecosystem. For now, this package is "isolated", though.

Although the transferring to organization is not an urgent issue, I think it's one to consider if we want to reorganize the repositories of ColorTypes, Colors and ColorVectorSpace.

cc: @timholy, @johnnychen94

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Adding support for non-RGB color spaces

  • Add tests for Gray (PR #16)
  • Add tests for blending RGB and Gray (PR #17)
  • Add support for Lab and Luv
    • multiply, screen, overlay, hard-light, soft-light
    • hue, saturation, color, luminosity (PR #19)
  • Add partial support for HSV, HSL and HSI (PR #20)
    • hue, saturation, color, luminosity

More composite operations support for opaque backdrop

The alpha composition is a type of operations on transparent colors. Especially if the backdrop is an opaque color, it cannot represent the transparent result. However, I do not want to promote the backdrop from Color to TransparentColor for the sake of consistency.

However, for some operations, if the backdrop is opaque, the result will always be opaque as well. Currently, only the default CompositeSourceOver supports the opaque backsdrop.

julia> CompositeSourceOver(RGB(0), RGB(0)) # the default op
RGB{N0f8}(0.0,0.0,0.0)

julia> CompositeDestination(RGB(0), RGB(0))
ERROR: MethodError: no method matching

julia> CompositeDestinationOver(RGB(0), RGB(0))
ERROR: MethodError: no method matching

julia> CompositeSourceAtop(RGB(0), RGB(0))
ERROR: MethodError: no method matching

julia> CompositeLighter(RGB(0), RGB(0)) # The spec. of "Lighter" is unclear, though.
ERROR: MethodError: no method matching

While opaque backdrop support is not so useful for the two-color compositing, they can be useful in the future when supporting the compositing of three or more colors .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.