img2css icon indicating copy to clipboard operation
img2css copied to clipboard

Extra features {rotation, colour inversion, b&w conversion}

Open lovemeblender opened this issue 8 years ago • 5 comments

It would be nice to add some extra features such as rotation, colour inversion or b&w conversion.

lovemeblender avatar Nov 02 '15 23:11 lovemeblender

It think it's better if image manipulation will be on the source image, there is a large amount of tools for that (lwip, jimp, camanjs). img2css should be focused on 1 thing. img-2-css.

asafyish avatar Nov 03 '15 04:11 asafyish

There are two important reasons in favor of this enhancement:

  1. Say that you generate a CSS picture using img2css and then you need to rotate it. Why would you go back to the original picture, rotate it and then generate the CSS again? What if you need to do several manipulations?
  2. Performing the manipulations on the CSS side is going to be faster than working directly on the image.

On top of that, img2css seems to be gaining popularity. It would be nice to give more life to this project by extending its main functionality.

lovemeblender avatar Nov 03 '15 12:11 lovemeblender

Use CSS to rotate it :P

ghost avatar Nov 04 '15 03:11 ghost

@lovemeblender,

I agree with @asafyish and @s3r1alpari4h, I think that img2css should focus on the conversion.

But you are right in the need to be able to extend the core functionality, what do you think about adding something where you can manipulate the image data without needing to read the image from a canvas? That way you can add as many filters as you want, without having to include those filters to the core.

javierbyte avatar Nov 04 '15 03:11 javierbyte

Are you suggesting directly manipulating the RGB array as in base64ImageToRGBArray.js ?

lovemeblender avatar Nov 04 '15 17:11 lovemeblender