GithubHelp home page GithubHelp logo

joelcarlson / rimagepalette Goto Github PK

View Code? Open in Web Editor NEW
46.0 46.0 1.0 7.02 MB

Create a representative palette from an image.

Home Page: https://github.com/joelcarlson/RImagePalette

License: Other

R 100.00%

rimagepalette's People

Contributors

joelcarlson avatar sheriferson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mdsumner

rimagepalette's Issues

In discrete scale ggplots the plot colors don't match the legend colors!

This is a big problem!
It seems that ggplot2::discrete_scale() calls the palette (RImagePalette::image_pal()) twice, once for the colors on the plot, and once for the legend. Since there is some randomness in median cut, this often results in a different palette, and thus different colors.

Yikes.

Need to set the seeds properly somewhere in image_pal

Should RImagePalette require/import `jpeg` package?

I just tried this out and according to the image_palette() documentation, you have to hand the function an image matrix from readJPEG() or similar.

I didn't already have the jpeg package installed and had to install it manually. As far as I can tell, there is no way to create the color palette without reading an image into an object first. If so, should the package make sure jpeg is installed?

If yes, I'm happy to make a small pull request with the change to the DESCRIPTION file.

Other than that, the color palette and examples in the README are great. This will be useful ๐Ÿ‘ .

Use C++ for median cut

Currently, the implementation of median cut is in R, and uses lists. This is not efficient as every time you modify a list in R it is copied.

Converting this to C++ would greatly speed up the process. Would also allow use of push and pop, which are missing from R lists.

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.