Friday, November 18, 2016

Bleg! Bleg!

Consider this image (a PNG file):


It has a white background. I would like to remove it, with some relatively cheap tool. All the tool has to do is remove white pixels, and... voila!

But every tool I have tried attempts to do some fancy "AI" pattern recognition of what should be removed, and winds up removing half of the graph edges.

No, just the white pixels! What could be simpler?

Does anyone know something that does this?

15 comments:

  1. There is not option in python to replace white pixels with clear ones?

    http://stackoverflow.com/questions/765736/using-pil-to-make-all-white-pixels-transparent

    ReplyDelete
    Replies
    1. I was hoping that I didn't have to program to accomplish this!

      Delete
    2. Hmm, but that program actually looks pretty simple! That might do the trick.

      Delete
    3. No PIL support for Python 3. Oh well.

      Delete
  2. I get different results depending on which viewer I use to open the new png file. With paint it looks good. Not so much with the other viewers

    ReplyDelete
  3. Pretty sure you can do that with gimp.(gimp.org)

    ReplyDelete
  4. 5 seconds in photoshop.

    http://www.robdodson.net/images/social_network_num_no_white.png

    ReplyDelete
    Replies
    1. I used to do this in Photoshop. That's why I added "cheap"!

      Delete
    2. I mostly use Acorn on the Mac these days, $29, for image processing.
      http://www.flyingmeat.com/acorn/

      Delete
    3. I meant to add, the operation is just as easy in Acorn.

      Delete
  5. Just open it in any image-editing program and use "Color to alpha..." or "Replace color...". Photoshop is the obvious option, but Gimp is free and, if you're on Mac, Acorn is inexpensive and nice.

    ReplyDelete
    Replies
    1. I've never liked GIMP. Photoshop is not in my budget. But Acorn did the trick! Thanks.

      Delete
  6. Color to Alpha with Gimp

    https://www.youtube.com/watch?v=eX5EEdaQbcc

    ReplyDelete
    Replies
    1. I would turn to GIMP if I found nothing else, but I have never been comfortable with that program.

      Delete

Current review queue

Pearce: British Journal for the History of Philosophy Deneen: The American Conservative Chao-Reiss: Computing Reviews