Rev Graphics Gurus

Richmond Mathewson geradamas at
Tue Oct 17 15:01:40 EDT 2006

Point 1; I am not a Graphic Guru (nor any other type
of Guru!).

Point 2; as usual I went for the naive route:  Thought
I would just have a bash at changing RGB values

imported my image

renamed it to a standard name "PIC"

put the colors of image "PIC" into field "F1" (there
are a number of fields: F1, Freset, F2, FXX, F12)

then I put a slider on my stack with values from 0 to

then popped a script in the slider:

on scrollBarDrag Bval
  put ((-255) + Bval) into fld "Fblue"
  put 1 into XX
  repeat until line XX of fld "F1" is empty
    put XX into fld "FXX"
    put line XX of fld "F1" into fld "F12"
    put line XX of fld "F1" into Cval
    put item 3 of Cval into THIRDval
    put THIRDval + Bval into ADDTBval
    if ADDTBval > 255 then
      put 255 into ADDTBval
    end if
    if ADDTBval < 0 then
      put 0 into ADDTBval
    end if
    put ADDTBval into item 3 of Cval
    put Cval into line XX of fld "F2"
    put XX + 1 into YY
    put YY into XX
  end repeat
  set the colors of control "PIC" to fld "F2"
end scrollBarDrag

it did all the addition with the 'BLUE' values very
niftily - but with the

set the colors of control "PIC" to fld "F2"

the damned image would not change colour

And I thought I was being clever!

sincerely, Richmond Mathewson

err - sorry about the abbreviations


"Philosophical problems are confusions arising owing to the fluidity of meanings users attach to words and phrases."
                                       Mathewson, 2006

Send instant messages to your online friends 

More information about the use-livecode mailing list