Inefficient code

Richmond Mathewson richmondmathewson at gmail.com
Sat Jun 27 06:21:31 EDT 2009


Richmond Mathewson wrote:
> I have uploaded my 'take' on this problem:
>
> http://mathewson.110mb.com/FILEZ/IMAGE COMPARE.rev.zip

Ho, Hum . . . clicking on the above takes you to some daft "templates" page.

If, however, you copy-paste 
http://mathewson.110mb.com/FILEZ/IMAGE COMPARE.rev.zip
into your browser the file will download.

Sorry for the inconvenience: forgot about spaces in file names.  :)
>
>
> On Fri, Jun 26, 2009 at 10:50 PM, Bert Shuler <bertshuler at yahoo.com 
> <mailto:bertshuler at yahoo.com>> wrote:
>
>     I have written this code a few different ways. Each seems to be
>     equally inefficient. I am attempting to compare to images, pixel
>     by pixel, and record the differences.
>
>     ON mouseUp pMouseBtnNo
>        put 0 into c
>        set the startvalue of scrollbar Progress to 0
>        set the endvalue of scrollbar Progress to the length of
>     imagedata of image "Alpha"
>        put the imagedata of image "Alpha" into idataalpha
>        put the imagedata of image "Beta" into idatabeta
>        REPEAT FOR each char myChar in idataalpha
>            set the thumbposition of scrollbar Progress to c
>            IF myChar is not  char (c) of idatabeta THEN
>                put c && char (c) of idatabeta & return after hAll
>            END IF
>            put c+1 into c
>        END repeat
>        put hAll into field "diff"
>     END mouseUp
>
>     It takes many minutes to process a 200x200 image. I want this code
>     to eventually compare full screen-captures, so if there is any way
>     to speed it up, I am open for advice.
>
>     Thanks
>
>     Bert
>     _______________________________________________
>     use-revolution mailing list
>     use-revolution at lists.runrev.com
>     <mailto:use-revolution at lists.runrev.com>
>     Please visit this url to subscribe, unsubscribe and manage your
>     subscription preferences:
>     http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>
>
> -- 
> -------------------------------------------------------------------------
>                Lifelong learning is living.
> -------------------------------------------------------------------------




More information about the use-livecode mailing list