Comments (2)
I totally agree; this is a good idea.
Unfortunately this is kind of tangled up in the mess of handling an optional dependency. Right now, the placement of the message is wrapped up in the way the optional RMagick
dependency is loaded. I would really like to completely re-evaluate how to handle this, as it's not handled in the most graceful way right now. (https://github.com/jordanstephens/paleta/blob/master/lib/paleta/palette.rb#L4-L29)
I'm actually not very happy with the optional RMagick
(and thus ImageMagick) dependency at all. I would really like to find a more light-weight alternative, but I'm not sure what our options are right now.
As I'm writing this, another option just occurred to me. We could possibly create a sort of "sister gem" which would depend on RMagick
and which would monkey patch the "generate from image" methods into Paleta::Palette
. Then we could stub that method in the main paleta
gem to explain to the user that the sister gem is required for the "generate from image" functionality. This would offload the dependency management to the user, reduce complexity in Paleta::Palette
, and warn about the extra dependency at a more appropriate time. I'm going to close this for now, and open up another issue to discuss these options. Hopefully we can solve this issue in the process.
Thanks.
cc @nadavshatz
from paleta.
@firedev this will get solved when #13 get's merged.
from paleta.
Related Issues (10)
- NoMethodError: private method `fit' called for #<Paleta::Palette:0x007febcd8215e8> HOT 7
- Handle optional RMagick dependency more gracefully HOT 3
- rmagick_available? HOT 1
- Similarity doesn't work properly HOT 1
- RGB colors does not seem right HOT 2
- Is this gem maintained? HOT 4
- generating a palette sometimes creates invalid negative numbers for lightness HOT 3
- CMYK value HOT 3
- Support three character hex codes HOT 3
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 paleta.