On Tue, 22 Oct 2013, Levente Uzonyi wrote:
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.
I just realized that it's one minute and nine seconds runtime for you. That's way more than what it should be. Reading an 1920x1004 non-interlaced RGBA png image takes less than 200 milliseconds for me using Cog.
Can you share the png image, so we can test it?
Levente
Levente
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners