PiSupply / PaPiRus

Resources for PaPiRus ePaper eInk displays
https://www.pi-supply.com/product/papirus-epaper-eink-screen-hat-for-raspberry-pi/
Other
346 stars 88 forks source link

Inverted picture pixels #132

Closed shawaj closed 6 years ago

shawaj commented 7 years ago

On a similar note to #80 it would be really cool to have an "inverse" function for papirus-draw that takes a picture, makes it black and white (as it does now) but then prints the inverse of it... So what would normally be black becomes white and vice versa

schwma commented 6 years ago

Note: It is also possible to invert colors in one line by letting ImageMagick invert the image and piping its output into papirus-draw.

Here is an example: curl https://raw.githubusercontent.com/PiSupply/PaPiRus/master/bitmaps/papirus-logo.bmp | convert - -negate - | papirus-draw - -t resize

However, when using -t resize the background surrounding the image's bounds is always rendered in white (which may or may not be desirable).

shawaj commented 6 years ago

@tvoverbeek should we add the note above from @schwma to the readme do you think?

tvoverbeek commented 6 years ago

@shawaj There is always more than one way to do things, especially in Unix/Linux. To do the inversion on the black & white image is more efficient than to do it on the (possibly) full color image as is the case when using ImageMagick convert. Hence, at least for me, no need to add this to the README.