Closed Bug 292729 Opened 20 years ago Closed 13 years ago

Images can't be loaded synchronously

Categories

(Core :: Graphics: ImageLib, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: rene.puchas, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.7) Gecko/20050414 Firefox/1.0.3
Build Identifier: Mozilla 1.7 from CVS

I am loading an image with imgILoader::loadImage() that will be printed. The
image has not been loaded before and therefore is not cached. So I need to wait
for the image to be completely loaded before I print.

However using a loop with PR_sleep() and checking if the image is finished
loading does not work, imgIRequest always returns STATUS_NONE. 

What I would need is a synchronous API that loads the image and returns an
imgIRequest that is fully loaded.

Reproducible: Always

Steps to Reproduce:
In the paint() method of a xul element load an image that has not yet been
loaded before and paint the image.
Actual Results:  
The image will not be printed as it has not finished loading when the page is
printed.

Expected Results:  
Provide an additional method loadImageSynchronous() that only returns after the
image has been completely loadd or the load has failed.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Printing should wait until after the load group has completed to start.  Perhaps
you should move your print call to the load group complete message?
I have xul elements that display differently on the printer. In the paint()
method  I find out I am printing this time (painting on a printer context) and
load the images.

Program execution is inside the paint() method - the print call has already been
done. I would like to wait until loading the images has finished and then go on
executing the paint() method to print the images.
Assignee: pavlov → nobody
QA Contact: imagelib
I don't think such a method will be added. It also looks like imageStatus behaves as expected at the moment.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.