Please, run the code below:
Setvirtualresolution(640,480)
global img as integer
global img_copy as integer
global w as integer
global h as integer
img = SelectImage()
if img <> 0
w = GetImageWidth(img)
h = GetImageHeight(img)
img_copy = CopyImage(img, 0, 0, w, h)
DeleteImage(img)
w = GetImageWidth(img_copy)
h = GetImageHeight(img_copy)
endif
do
Print(w)
Print(h)
sync()
loop
end
function SelectImage()
image as integer
if ShowChooseImageScreen() = 1
while IsChoosingImage() = 1
sync()
endwhile
image = GetChosenImage()
endif
endfunction image
If you select an image, lets say 640x480, then the program will print the size of the image.
and run the code slightly altered:
Setvirtualresolution(640,480)
global img as integer
global img_copy as integer
global w as integer
global h as integer
img = SelectImage()
if img <> 0
w = GetImageWidth(GetChosenImage())
h = GetImageHeight(GetChosenImage())
img_copy = CopyImage(img, 0, 0, w, h)
DeleteImage(img)
w = GetImageWidth(img_copy)
h = GetImageHeight(img_copy)
endif
do
Print(w)
Print(h)
sync()
loop
end
function SelectImage()
image as integer
if ShowChooseImageScreen() = 1
while IsChoosingImage() = 1
sync()
endwhile
image = GetChosenImage()
endif
endfunction image
if you select the same image the program will print 0
I think this is a bug