Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Change all colors in an image except black

  1. Dec 4, 2015 #1
    Hello,

    I have a typesetting software which can export typeset math as normal, nice looking black LaTeX text. However it always puts it on a white background. How can I change the background color of an image (png or jpeg) without changing the black text contained int he image? Should I write a script that can do this or is there already a tool to do so? I want the background of the picture to match the background of my poster.

    Thanks
     
  2. jcsd
  3. Dec 4, 2015 #2

    Borg

    User Avatar
    Science Advisor
    Gold Member

    It's possible to set the background of a jpeg to be transparent. I don't know what the capabilities of your software is though.
     
  4. Dec 4, 2015 #3

    jedishrfu

    Staff: Mentor

  5. Dec 4, 2015 #4
    I was thinking of writing a program to cycle through each pixel and convert it to the color I want, skipping the black pixels, but I don't know if that is overkill or if there is some other easy way to do it.

    Edit: cool...I will check that out
     
  6. Dec 6, 2015 #5

    CWatters

    User Avatar
    Science Advisor
    Homework Helper

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Change all colors in an image except black
  1. Debluring images? (Replies: 2)

  2. Image Compressor (Replies: 3)

  3. Image resolution (Replies: 16)

Loading...