joelcarlson / RImagePalette

Create a representative palette from an image.
https://github.com/joelcarlson/RImagePalette
Other
45 stars 1 forks source link

Should RImagePalette require/import `jpeg` package? #3

Closed sheriferson closed 8 years ago

sheriferson commented 8 years ago

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 :+1: .

joelcarlson commented 8 years ago

Thanks for the feedback! Hmm, interesting. For some reason I though jpeg and png were installed along with base R. Seems like a reasonable thing to do, submit away!

edit: If you're going to submit the PR, you should probably add png also

joelcarlson commented 8 years ago

Actually, I had to revert this change. When doing R CMD check this creates a warning due to packages being imported, but not used. Since readJPEG and readPNG are never actually used in the package, only in the examples, it is inappropriate to import them.

Regardless, thank you for the contribution!

sheriferson commented 8 years ago

No worries. Cheers.