Again, another problem with an image that when passed to LoadImage() crashed the program without any possible interference on my side to prevent the crash.
Here is the example code:
Code:
EnableExplicit
If FileSize("image.png") <= 0
InitNetwork()
ReceiveHTTPFile("https://drive.google.com/uc?authuser=0&id=1Kbk46OOyOU4QvKhTH4Y5-7iPbgFvcxqY&export=download", "image.png")
EndIf
; image.png can not be loaded with UsePNGImageDecoder()
; if TGAImageDecoder is also used in the program, the program crashes without any further notice.
UsePNGImageDecoder()
; UseTGAImageDecoder() ; uncomment to let the program crash.
Debug "try to load image:"
If LoadImage(0, "image.png")
Debug "ok." ; this is never reached!
FreeImage(0)
Else
Debug "could not load image, but no crash"
EndIf
End
The image is downloaded when executing the code.
Code and image can be downloaded manually as well:
https://drive.google.com/drive/folders/ ... sp=sharing