Re: Image fill question

2014-11-05 Thread Jim Lambert
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 ur

Re: Image fill question

2014-11-05 Thread FlexibleLearning.com
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 cus

Re: Image fill question

2014-11-04 Thread Richard Gaskin
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 goin

Re: Image fill question

2014-11-04 Thread Scott Rossi
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 binaryEncode("",0

Re: Image fill question

2014-11-04 Thread Thierry Douez
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

Re: Image fill question

2014-11-04 Thread J. Landman Gay
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 s

Image fill question

2014-11-04 Thread FlexibleLearning.com
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). I'v