text color background color
-
- Posts: 3
- Joined: 2013-08-18T00:30:46-07:00
- Authentication code: 6789
text color background color
I want to extract text color and background color from a PNG file. PLease help me how can I do it. Thanks Sujan
Re: text color background color
You need to add more information: Platform, IM version and programming language you want to use as well as an example..
-
- Posts: 3
- Joined: 2013-08-18T00:30:46-07:00
- Authentication code: 6789
Re: text color background color
I am trying to get the image's backgroun color using python - pythonMagick. How can I get the RGB values of the current background.
Code: Select all
im2 = PythonMagick.Image('myimage.png')
bgColor = im2.backgroundColor().to_std_string()
print bgColor
-
- Posts: 3
- Joined: 2013-08-18T00:30:46-07:00
- Authentication code: 6789
Re: text color background color
I am working in Linux Ubuntu with python 2.7.5 and pythonMagick. Please help me how can I get the background color of my image.?? My image is a converted PDF to PNG. It has text and background color. Generally the background color is white but sometimes the background color is other (green, blue, red etc)...How can I get the background color.
I actually want to calculated the contrast of my PDF file. So trying to convert it into an image then extract the background color. please help. Thanks Sujan
I actually want to calculated the contrast of my PDF file. So trying to convert it into an image then extract the background color. please help. Thanks Sujan
Code: Select all
im2 = PythonMagick.Image('myimage.png')
bgColor = im2.backgroundColor
red = bgColor.redQuantum()
green = bgColor.greenQuantum()
blue = bgColor.blueQuantum()
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: text color background color
It would help if you provided an example image.
What distinguishes text from background? Are they solid colours, with or without antialiasing? Pehaps histogram would help, giving the two most common colours.
What distinguishes text from background? Are they solid colours, with or without antialiasing? Pehaps histogram would help, giving the two most common colours.
snibgo's IM pages: im.snibgo.com