Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Thread Tools Rate Thread Display Modes
Old 05-31-2012, 11:39 AM   #1
Senior Member
Join Date: Nov 2009
Posts: 123
Default loading multi-layered images, any suggestions? PSD toooo slow.


I'd like to load multi-layered images into AS3. I used an psd-to-as3 parser (github.com/warrenseine/as3-psd-parser) and it works fine, but is INCREDIBLY slow. It perhaps takes 8 seconds to parse a 2MB PSD file. Unsurprisingly, reducing the file size reduces the time taken to load the image, but no way near as this would be achieved if I just converted all the layers in the image to PNG and loaded those individually (with bulkloader).

I thought to see if TIFFs were also similarly slow to be loaded, but have yet to find a small enough add on collection of classes to let me do so.

Any suggestions would be appreciated
aca98atw is offline   Reply With Quote
Old 05-31-2012, 06:20 PM   #2
Registered User
Join Date: May 2012
Posts: 14

Does this help?

thelemur is offline   Reply With Quote
Old 05-31-2012, 06:39 PM   #3
Senior Member
Join Date: Nov 2009
Posts: 123

Thanks but afraid that's the same parser I used (someone else just published that chap's work on github, but cited the author).
aca98atw is offline   Reply With Quote
Old 05-31-2012, 10:25 PM   #4
podlium's Avatar
Join Date: Mar 2007
Posts: 92
Send a message via Skype™ to podlium

Well... flash can only load jpeg/png/gif with his build in loader which is relatively fast, for other image types you can of course make custom loaders, but that is slow as hell... First most of the image formats like psd or tiff are compressed and decompresing takes a lot of resources, and second, you have to draw that decompresed data in a Bitmap which is even slower... Flash is slow, dont expect that you can find or code some fast image loaders. Some while ago i coded a PNG loader cause of the flash image size limitations and i wanted to be able to load big PNGs. It turned out, compared to built-in loader, it was 10 times slower... and i really optimized the code as much as i could...
resistance is futile!!!
podlium is offline   Reply With Quote
Old 06-01-2012, 04:29 AM   #5
Senior Member
Join Date: Nov 2009
Posts: 123

Cheers Podium. Think I won't bother with psd after all. Not to worry. Was hoping there would be some native multi layered image format I could use - I liked the idea of hiding layers in the image as needed and having the relative positions between layers already(and easily) specified in Photoshop. Oh well. Cheers, Andy.
aca98atw is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 09:07 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.