dahtah / imager

R package for image processing
GNU Lesser General Public License v3.0
187 stars 43 forks source link

Potential bug in cimg2magick function #141

Closed max-poltora closed 3 years ago

max-poltora commented 3 years ago

Good afternoon!

I guess, there is a potential bug in cimg2magick(). I am not sure, what was the idea of dropping out one of the layers of a cimg image object, when converting it to magick object, but the feature is inappropriate when working with 3-channel images. Certainly, the workaround would be just to use magick::image_read() directly on cimg object.

ShotaOchi commented 3 years ago

Thanks for reporting it. image_read function didn't read cimg object when I wrote the function. I decided to pass cimg object as array but my implementation wasn't good. We no longer need cimg2magick function. cimg2magick function should be deprecated now.

max-poltora commented 3 years ago

@ShotaOchi, thank you for reverting with details! I am still using the cimg2magick function in a couple of codes, but going to replace it then.