[Newbies] Reading PNG images into squeak image is slow

Levente Uzonyi leves at elte.hu
Tue Oct 22 21:46:27 UTC 2013


On Tue, 22 Oct 2013, Mateusz Grotek wrote:

> It is (even on Cog).
> What is the reason for that?
> Is it a problem with the algorithm used in the image or it's unsolvable
> inside the image and a plugin or FFI is needed.

I doubt it can be significantly faster using smalltalk only. When we 
wanted to store images in files using lossless compression, we decided to 
use jpeg instead of png, because it has plugin support, so it's a lot 
faster to load and save the images.

>
> P.S.
>
> Code:
> (PNGReadWriter formFromFileNamed: something) durationToRun "0:00:01:09.591"
> "unacceptale if you want to program an image browser"
>
> Data:
> 1301.png: PNG image data, 2048 x 1536, 8-bit/color RGB, non-interlaced
> (a pic of a street taken from a cell phone)

That image is huge. Cell phones and digital cameras usually create jpeg 
images. But if you really need to support png, then ffi or a plugin is the 
way to go.


Levente

> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>


More information about the Beginners mailing list