PNG importing appears to be broken ( was Re: [squeak-dev] Who understand bilinear interpolation for reducing image size?)

J. Vuletich (mail lists) juanlists at jvuletich.org
Sun Dec 14 03:52:34 UTC 2014


Hi Tim,

I think this is the real solution. See below.

Quoting "J. Vuletich (mail lists)" <juanlists at jvuletich.org>:

> Quoting "J. Vuletich (mail lists)" <juanlists at jvuletich.org>:
>
>> Quoting Bert Freudenberg <bert at freudenbergs.de>:
>>
>>> On 12.12.2014, at 20:09, tim Rowledge <tim at rowledge.org> wrote:
>> i>> Scratch has to use paint.
>>>
>>> Then Scratch has to make it usable for that. All I'm saying is  
>>> that we should not make the general importer worse for the special  
>>> case of Scratch.
>>>
>>> So as soon as the imported form enters Scratch code, fix up the  
>>> RGB values. Why wouldn't that work?
>>>
>>> - Bert -
>>
>> +1
>>
>> Cheers,
>> Juan Vuletich
>
> Just doing 'aForm asFormOfDepth: 16' should suffice. This should  
> convert pixels with alpha below some threshold to zero, giving forms  
> that work ok with 'paint'.
> Cheers,
> Juan Vuletich

The problem is that #asFormOfDepth: is broken if the source is 32bpp  
with translucency. The attach (only tested in Cuis) fixes it.

Cheers,
Juan Vuletich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2134-32to16bpp-fix-JuanVuletich-2014Dec14-00h43m-jmv.1.cs.st
Type: application/vnd.sailingtracker.track
Size: 2252 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20141214/7b47713f/2134-32to16bpp-fix-JuanVuletich-2014Dec14-00h43m-jmv.1.cs.bin


More information about the Squeak-dev mailing list