Fwd: Shrink Image quickly

Sannyasin Sivakatirswami katir at hindu.org
Mon Jan 6 12:37:00 EST 2003


Maybe someone on the MC list will know

Begin forwarded message:

> From: "Ken Ray" <kray at sonsothunder.com>
> Date: Sun Jan 5, 2003  10:44:18 PM Pacific/Honolulu
> To: <use-revolution at lists.runrev.com>
> Subject: Re: Shrink Image quickly
> Reply-To: use-revolution at lists.runrev.com
>
> It's not the "send" that's the problem. I ran your code inside a tight
> repeat loop and got the same results, both with the alwaysBuffer on 
> and off
> for both the image and the stack. I'll bet it has something to do with 
> the
> fact that for each pass at shrinking, the image needs to be redefined 
> to be
> displayed, which means going through each pixel in the image 
> determining
> what to do with it. I don't know how to make this any faster; perhaps
> Scott/Kevin can provide some suggestions?
>
> Ken Ray
> Sons of Thunder Software
> Email: kray at sonsothunder.com
> Web Site: http://www.sonsothunder.com/
>
> ----- Original Message -----
> From: "Sannyasin Sivakatirswami" <katir at hindu.org>
> To: <use-revolution at lists.runrev.com>
> Sent: Monday, January 06, 2003 12:08 AM
> Subject: Shrink Image quickly
>
>
>> In theory the following script should shrink an image 280 pixels wide
>> in under 1 second... but it takes forever... 3-4 seconds.  Even 
>> setting
>> the "send in' down to 1 millisecond doesn't speed it up up... a
>> threshold is reached at about 20 ticks where setting it any lower does
>> not speed up the event at all...  Goal is: shrink and image while is 
>> is
>> moving along a path, smoothly, quickly.
>>
>> local imageRect
>> on mouseup
>>    put the rect of image "shrinkTest" into imageRect
>>    put imageRect
>>    Shrinking
>> end mouseup
>>
>> on Shrinking
>>    put the width of img "shrinkTest" into x
>>    if x = 20 then
>>      restoreSize
>>      exit Shrinking
>>    end if
>>    put the height of image "shrinkTest" into y
>>    set the width of image "shrinkTest" to  (x - 1)
>>    set the height of image "shrinkTest" to  (y - 1)
>>    send "Shrinking" to me in 1  milliseconds
>> end Shrinking
>>
>> on restoreSize
>> set the rect of image "Shrink Test" to imageRect
>> end restoreSize
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the metacard mailing list