[Laszlo-user] Image stretching problem
bs .
palantir0 at gmail.com
Mon Oct 29 17:39:57 PDT 2007
Unfortunately, it didn't have any effect. I made a small test program to
show it clearly.
You can see the code below in operation at:
http://mtterra.com/image_test.htm
It starts with the small image, just double click and it will toggle the
large image then small. The small image is 640x480. The large one is
2048x1536.
I have read on other threads that unload() might have some issues. I
noticed it doesn't really free my large images. Very noticable since my
firefox usage jumps from 100M to 130M and doesn't drop. I'm still working
on that one, probably a code error but never know. I haven't checked it
against 3.3.3.
Cheers,
Bruce
<canvas width="700" height="600">
<debug y="500" height="200" width="500"/>
<view y="20" height="500" width="600" name="pic" stretches="both">
<attribute name="toggle" type="boolean" value="false" />
<handler name="ondblclick">
this.unload();
if (this.toggle)
this.setSource('http://mtterra.com/images/small.jpg');
else
this.setSource('http://mtterra.com/images/large.jpg');
this.toggle = !this.toggle;
</handler>
<method event="oninit">
this.setSource('http://mtterra.com/images/small.jpg');
</method>
</view>
</canvas>
On 10/29/07, J Crowley <jcrowley at laszlosystems.com> wrote:
>
> Try unload() on the view before you call setSource(). This stumped me for
> a while, too, where images seemed to retain the size properties of the
> previous image, but this seems to work.
> On Oct 29, 2007, at 4:27 PM, bs . wrote:
>
>
> I've posted this on the forums but different folks read email.
>
> There are two issues I have found with using images in 4.0.5. The link
> below is a filing for image stretching that works with setSource(small.img)
> then setSource(big.img) however when setting it back to small.img, the
> scaling used is the one generated for the big.img. I did try some of the
> functions like updateResourceSize() but no change.
>
> 1) http://www.openlaszlo.org/jira/browse/LPP-4981
>
> The other issue is slightly different but may be related. Stretching just
> stops at some point. Doesn't matter the size.
> 2) http://www.openlaszlo.org/jira/browse/LPP-4975.
>
> I might be able to work around #1 by dynamically creating/destroy views
> but I'd like to avoid this. I don't know how to work around #2.
>
> Thanks,
> Bruce
>
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-user/attachments/20071029/3b3b2e42/attachment.html
More information about the Laszlo-user
mailing list