[squeak-dev] The Trunk: MorphicExtras-kfr.275.mcz
Thiede, Christoph
Christoph.Thiede at student.hpi.uni-potsdam.de
Sat Jun 13 13:02:59 UTC 2020
Hi Karl,
what's your motivation for this commit? I think transparent gifs should be displayed transparently in Squeak. You can always add an opaque background in your application if it does not want this :-)
Apart from that: Why don't you use #detect:ifFound: here? There is no need to scan all images after one that contains transparency has been found. I guess.
<http://www.hpi.de/>
Best,
Christoph
________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von karl ramberg <karlramberg at gmail.com>
Gesendet: Samstag, 13. Juni 2020 13:33:01
An: The general-purpose Squeak developers list
Cc: packages at lists.squeakfoundation.org
Betreff: Re: [squeak-dev] The Trunk: MorphicExtras-kfr.275.mcz
I was afraid this would be a slow search, but its negligible.
Tested performance on a quite big gif* and it was only 1900 ms on my slow computer
*https://web.archive.org/web/20140209162456/http://www.majhost.com/gallery/NoBullet/TF2/t2.gif
Best,
Karl
On Sat, Jun 13, 2020 at 1:12 PM <commits at source.squeak.org<mailto:commits at source.squeak.org>> wrote:
Karl Ramberg uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-kfr.275.mcz
==================== Summary ====================
Name: MorphicExtras-kfr.275
Author: kfr
Time: 10 June 2020, 6:41:33.727777 pm
UUID: 26fa97c9-e242-8048-8c7c-53b2061c19f4
Ancestors: MorphicExtras-mt.274
Detect if animated image (eg. gif) has transparent color and use opaque background if so.
=============== Diff against MorphicExtras-mt.274 ===============
Item was changed:
----- Method: AnimatedImageMorph>>fromReader: (in category 'private') -----
fromReader: reader
-
images := reader forms.
delays := reader delays.
+ images do:[: each | (each colors includes: Color transparent) ifTrue:[self isOpaque: true]].
- self isOpaque: true.
self reset.!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200613/2a96a0ac/attachment.html>
More information about the Squeak-dev
mailing list
|