Label an Image with Text?
Glenn E. Fisher
gefisher at mac.com
Sat Dec 11 08:24:30 EST 2004
Hi Rick,
You wrote:
> Hi there,
>
> I was wondering if there is a way in Rev to paint a text label
> onto a jpeg image file and then save it as part of the jpeg file
> when I export it.
>
> (I also noticed the lack of a text tool for doing that in the
> paint tools.)
>
> Anyone?
Is the text dynamic? or can you build it as an image outside of RR?
I have modified images that I use for button icons by merging two .png
files
whose alpha masks don't overlap with the following transcript that is
fast
enough for icon sized images:
on mergeImages im1,im2,imout
put the imageData of image im1 into d1
put the imageData of image im2 into d2
put the alphaData of image im1 into a1
put the alphaData of image im2 into a2
put the height of image im2 into h
put the width of image im2 into w
put the length of d2 into n
put 0 into i
repeat for each char c in a1
add 1 to i
if i>n then exit repeat
put charToNum(c) into x
if x=0 then
put char 4*i-3 to 4*i of d2 after d3
put char i of a2 after a3
else
put char 4*i-3 to 4*i of d1 after d3
put char i of a1 after a3
end if
end repeat
if there is not an image imout then
create image imout
end if
set the text of image imout to empty
set the height of image imout to h
set the width of image imout to w
set the imageData of image imout to d3
set the alphaData of image imout to a3
end mergeImages
HTH,
Glenn
Glenn E. Fisher University of Houston - Retired
22402 Diane Dr. Spring, Tx 77373
gfisher4 at houston.rr.com http://www.uh.edu/~fisher
http://home.houston.rr.com/thegefishers/
http://homepage.mac.com/gefisher
More information about the use-livecode
mailing list