Re: Writing text on images
- From: Nicholas Sherlock <N.sherlock@xxxxxxxxx>
- Date: Fri, 21 Apr 2006 19:35:59 +1200
billjoe wrote:
I was wondering if I could do away with using the halo. I am afraid, it
would make the look of resulting image a bit "unreal". I was interested
in a method that could give me the most ideal color (if there can be
one) even if it comes at the cost of doing some processing on the
background image, if needed.
The only way that a single text colour could work would be if the area that the text occupied was mostly the same colour/brightness. Otherwise, you'll have to add an outline stroke, halo, drop shadow, or translucent box behind the text to homogenize the area around the text. This is what subtitle renderers for video players do.
If your background is homogeneous, you could just check the brightness of the background area that the text will cover. >128, use black text. <=128, use white text.
Cheers,
Nicholas Sherlock
--
http://www.sherlocksoftware.org
.
- References:
- Writing text on images
- From: billjoe
- Re: Writing text on images
- From: Nicholas Sherlock
- Re: Writing text on images
- From: billjoe
- Re: Writing text on images
- From: Nicholas Sherlock
- Re: Writing text on images
- From: billjoe
- Writing text on images
- Prev by Date: Re: Writing text on images
- Next by Date: Re: Fast segmentation of large images
- Previous by thread: Re: Writing text on images
- Index(es):