Change all colors in an image except black

  • Thread starter Thread starter Hercuflea
  • Start date Start date
  • Tags Tags
    Change Image
Click For Summary
SUMMARY

This discussion focuses on changing the background color of an image while preserving black text. Users recommend using ImageMagick, a powerful command-line tool for image manipulation, to achieve this effect. The discussion also mentions the possibility of using a "magic wand" feature in certain graphic software to select and modify specific areas of the image. The user is encouraged to explore these tools rather than writing a custom script for pixel manipulation.

PREREQUISITES
  • Familiarity with ImageMagick command-line tools
  • Understanding of PNG and JPEG image formats
  • Basic knowledge of graphic editing software features
  • Awareness of pixel manipulation techniques
NEXT STEPS
  • Explore ImageMagick for background color manipulation
  • Research the "magic wand" feature in graphic editing software
  • Learn about transparency settings in JPEG and PNG formats
  • Investigate alternative image editing tools for background changes
USEFUL FOR

This discussion is beneficial for graphic designers, software developers working with image processing, and anyone looking to modify images while preserving specific elements like text.

Hercuflea
Messages
593
Reaction score
49
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
 
Computer science news on Phys.org
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.
 
  • Like
Likes jedishrfu
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
 
I am having a hell of a time finding a good all-in-one inkjet printer. I must have gone through 5 Canon, 2 HP, one Brother, one Epson and two 4 X 6 photo printers in the last 7 yrs. all have all sort of problems. I don't even know where to start anymore. my price range is $180-$400, not exactly the cheapest ones. Mainly it's for my wife which is not exactly good in tech. most of the problem is the printers kept changing the way it operate. Must be from auto update. I cannot turn off the...

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
153K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
8
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
5
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 4 ·
Replies
4
Views
13K