Preloader to estimate time for a function to finish?
Hello. I'm building an AIR project that uses images stored locally to perform some calculations using their bitmapData. In this app I browse my hard drive via an application menu command I created, select an image (using FileReference) and it loads. When it finishes loading, the calculations take place and the image is added to the stage. The larger the image, the longer this takes.
So far, so good.
I added a preloader to check the FileReference loading time and another for the loadBytes method I use later to be able to use the bitmapData. What surprised me was that both theses processes were very fast, but with larger images they were taking a long time to be added to the stage. Some tracing and commenting later, I discovered the culprit was one of the calculations I was doing, involving pixel counts. So my question is, is there any way to create a preloader for this function?
Thank you.
