Main forum > Bug Reports

GLBasic Version 16.793 (Steam) does not load the jpg file and some png (confirm)

(1/4) > >>

Qedo:
GLBasic Version 16.793 (Steam) does not load the jpg file and some png (probably large dimensions).
Verified on two computers (Win10).
Gernot could you verify?
Thank you

ad maiora

Kitty Hello:
can you zip me a tiny project?

Qedo:
Thank you.

--- Code: (glbasic) ---// --------------------------------- //
// Project: loadspritejpg
// Start: Wednesday, June 30, 2021
// IDE Version: 16.793
SETCURRENTDIR("Media") // go to media files
SETFONT 0,2
file$="any_jpeg_file_and_some_png.jpg"
IF DOESFILEEXIST(file$)
ok% = LOADSPRITEMEM(file$, w%, h%, pixRGBA%[])
LOADSPRITE file$,0
GETSPRITESIZE 0,sx,sy // return sx=0 and sy=0
DRAWSPRITE 0,0,0 // don't show the sprite
PRINT sx+" "+sy,0,0 // wrong dimensions=0
SHOWSCREEN
MOUSEWAIT
ELSE
PRINT "the file "+file$+" don't exist",0,0
SHOWSCREEN
MOUSEWAIT
ENDIF
--- End code ---

Kitty Hello:
Good find. It was a signed/unsigned error checking the first bytes of the file. I'll prepare an update.

Qedo:
Gernot,
waiting for the update I am using version 16.720 and I have noticed that it crashes when I load (LOADSPRITE) large png files.
In my case the file is 3701x2387 pixels. With 15.238 version no problem
I do not know if this problem will be present in the future version but in any case I report it for your verification.
Thank you

Navigation

[0] Message Index

[#] Next page

Go to full version