Thierry, Scott...
Thank you both. Clear and concise. Since I need the black border, I will use
Thiery's custom routine (added bonus points for arbitrary border color!),
but for a generic solution for any arbitrary sized image where fill-only is
required, Scott's is faster as it has no internal
Hugh wrote:
The Challenge:
Fill a 10x10 image with an arbitrary solid color and a 1px black border.
The Solution:
Don’t use an image use a graphic.
;)
Jim Lambert
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to
I have a 10px x 10px image. There is a 1px black border with a colour fill.
How do I set the colour fill of the image using an arbitrary RGB value?
It needs to be a mathematical approach setting the pixel data directly
(taking and applying a screen shot of a graphic is going to be too slow).
On 11/4/2014, 12:20 PM, FlexibleLearning.com wrote:
I have a 10px x 10px image. There is a 1px black border with a colour fill.
How do I set the colour fill of the image using an arbitrary RGB value?
It needs to be a mathematical approach setting the pixel data directly
(taking and applying a
Hi Hugh,
Quick and dirty but seems to work...
-- I assume your original image is already 10x10
-- next 2 lines: 0, R, G and Blue
put numtochar(0) numtochar(178) numtochar(150) numtochar(255)
into myColor
put numtochar(0) numtochar(0) numtochar(0) numtochar(0) into
myBorderColor
Here is a technique I use to fill an image with a solid color.
on mouseUp
put long id of img 1 into pImage --- THE TARGET IMAGE
put 255,0,0 into pColor --- THE RGB COLOR
fillImageWithColor pImage, pColor
end mouseUp
command fillImageWithColor pImage, pColor
put
Hugh Senior wrote:
I have a 10px x 10px image. There is a 1px black border with a colour
fill.
How do I set the colour fill of the image using an arbitrary RGB value?
It needs to be a mathematical approach setting the pixel data directly
(taking and applying a screen shot of a graphic is