Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Qedo

Pages: 1 [2] 3 4 ... 24
16
Sorry maybe I added confusion with the last post.
To clarify the problems I encountered are two and the situation is the following:
1) vers. 16,793 (currently the latest steam version)
      It does not load all the Jpg files and some Png files
2) vers. 16,720
      Do not load the attached nihli.jpg file (and maybe someone else )

Thank you

Ad maiora

17
spacefractal thank you
In my case the problem is on the png file (which I have attached) and not on an ipg, and then the program I am writing must allow in real time to be able to load either jpg or png indifferently and therefore I cannot previously do any type of conversion.

Ad maiora

18
Update:
I did further tests and it is not the size of the images that cause the program to crash because I loaded even bigger png without problem.
Only the attached image (designed by me )  crash the program . I don't understand why with normal graphics programs (GIMP) I display it correctly.
You can check?
Thank you

19
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

20
Before the dialog opens.

21
the crash occurs when it executes the line:
int ret = GetOpenFileNameA (& ofn);

However I partially solved it by adding the following code.
? IFDEF GLB_DEBUG
a $ = "C: /image/image.png" // simulate
? ELSE
LOCAL a $ = Get_Open_File_Name $ ()
? ENDIF

22
GLBasic - es / Re: Html5 de Steam?¿
« on: 2021-Jul-07 »
mentalthink welcome back.
I confirm that steam html5 compiles and seems to work fine.
I haven't tested it heavily but on a small project it works.

(google traducción)
mentalthink bienvenido de nuevo.
Confirmo que Steam html5 se compila y parece funcionar bien.
No lo he probado mucho, pero en un proyecto pequeño funciona.

ad maiora


23
It doesn't work, it's definitely a problem with my computer. I loaded your code but except sometimes in debug mode the system crashes

ad maiora

24
Good news and ....... welcome back spacefractal  :good:

25
Thank you erico  :good:

26
Thank you Gernot.
Also this version work in normal mode but  in Debug mode i get the following:

*** Unhandled exception ***
   ExceptionCode = 0xc0020043

it's a stupid problem that complicates debugging of the program but when compiled it works fine

P.S:
thanks for the very useful clarifications

27
Thank you.
Code: (glbasic) [Select]
// --------------------------------- //
// 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

28
Hi,
about the problem described in: https://www.glbasic.com/forum/index.php?topic=11508.0
This bug does not allow me to develop the program I am making because it is a blocking problem.
Question:
how can to return to a older and working GLB Steam version, waiting for this bug to be fixed?
Thank you

29
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

30
Thanks
if it can help I use this code

Code: (glbasic) [Select]
SETCURRENTDIR("Media") // go to media files
file$=Get_Open_File_Name$()

Code: (glbasic) [Select]
// --------------------------------- //
// Project: Qedo
// Start: Saturday, June 26, 2021
// IDE Version: 16.793

INLINE
}
#define HINSTANCE W32HINSTANCE
#define HINSTANCE__ W32HINSTANCE__
#define HMODULE W32HMODULE
#undef LPSTR
#undef DECLARE_HANDLE
#undef LPCTSTR
#undef DWORD
#undef LPWSTR
#undef LPCWSTR
#define HWND W32HWND
#define HWND__ W32HWND__
#define HANDLE W32HANDLE
#undef MAX_PATH
#undef TCHAR
#define WIN32_LEAN_AND_MEAN
#define WinMain WinMain2
#include <windows.h>
#include <commdlg.h>
namespace __GLBASIC__ {
ENDINLINE
FUNCTION Get_Open_File_Name$:
INLINE
    char filename[ 200 ];
    char filetitle[ 200 ];
    tagOFNA ofn;
    *filename = 0; *filetitle = 0;
    for(int i=0; i<sizeof(tagOFNA); ++i) // ZeroMemory
    {
((char*)&ofn)[i] = 0;
    }

    ofn.lStructSize  = sizeof( ofn );
    ofn.hwndOwner    = GetFocus();  // If you have a window to center over, put its HANDLE here
    ofn.lpstrFilter  = "Jpg & Png File\0*.Jpg;*.png\0All Files(.)\0*.*\0";
    ofn.lpstrFile    = filename;
    ofn.nMaxFile     = 1000;
    ofn.lpstrTitle   = "Select a photo";
    ofn.Flags        = OFN_DONTADDTORECENT | OFN_FILEMUSTEXIST;
    ofn.lpstrInitialDir   = "."; // Initial directory.
    ofn.lpstrFileTitle    = filetitle;
    int ret=GetOpenFileNameA(&ofn);
    return filename;
 ENDINLINE
ENDFUNCTION

Pages: 1 [2] 3 4 ... 24