W
Wraithious
Guest
Hello, in my project I'm getting an image from the player like this:
which is fine, BUT if the image is larger than 8192 x 8192 I want to switch to another way of loading the image, such as creating a buffer to get a portion of the image, then again use the buffer to start off where it left off on the image and get the next portion of the image etc.. To be specific here I'm dealing with satelite images that some (but not all) are as large as 16384 x 16384 So the image would have to be chunked into 4 seperate images.
So my question is, How can I determine BEFORE attempting to get the image what the size of the image is? because loading larger than 8192 x 8192 images crashes the game with an out of memory error (as expected that it should), thanks for any help you can give
Code:
///Load normal sized images
if(mouse_x>96 && mouse_x<144 && mouse_y>0 && mouse_y<32 && global.progress=0 && canpress=1) {
global.pic1 = get_open_filename("Image file|*.png;*.jpg;*.gif;*.tif", "");
if((string_pos(".png", string(global.pic1))|| string_pos(".PNG", string(global.pic1)))||(string_pos(".jpg", string(global.pic1)||
string_pos(".JPG", string(global.pic1))|| string_pos(".gif", string(global.pic1))|| string_pos(".tif", string(global.pic1))|| string_pos(".TIF", string(global.pic1))))) {
sprite_replace(sourceImage,global.pic1,1,0,0,0,0);
}
global.progress=1;
x=0;
y=0;
canpress=0;
imgNum=0;
alarm[0]=15;
}
So my question is, How can I determine BEFORE attempting to get the image what the size of the image is? because loading larger than 8192 x 8192 images crashes the game with an out of memory error (as expected that it should), thanks for any help you can give