Wait for image to load with set filename
Posted: Thu Apr 11, 2013 9:44 pm
Hey All,
So I am creating an image at runtime then setting the filename to a local file then I reasize it to a certain size. Is there a way to determine when the image is fully loaded and ready to manipulate. For really large images it seems to set the filename and then set the width and height but then the image actually loads in fully and the width and height are changed back to the original width and height of the image.
I tried this which I thought would work but I am seeing the same results,
Thanks for taking the time to look at my issue.
So I am creating an image at runtime then setting the filename to a local file then I reasize it to a certain size. Is there a way to determine when the image is fully loaded and ready to manipulate. For really large images it seems to set the filename and then set the width and height but then the image actually loads in fully and the width and height are changed back to the original width and height of the image.
I tried this which I thought would work but I am seeing the same results,
Code: Select all
create invisible image in pTarget
put the long id of the last image of pTarget into tID
set the threeD of tID to false
set the width of tID to 1 --Set initial image size
set the filename of tID to pFile
wait until the width of tID <> 1
set the width of tID to XXX -- Set image to some width value, not always the same
set the height of tID to xxx -- Set image to some height value, not always the same