[Gambas-user] Is it possible to use a library that uses gb.sdl2 in a graphic project?

Benoît Minisini g4mba5 at gmail.com
Fri Mar 11 13:35:56 CET 2022


Le 11/03/2022 à 10:18, Gianluigi a écrit :
> 
> 
> Il giorno ven 11 mar 2022 alle ore 00:56 Benoît Minisini 
> <g4mba5 at gmail.com <mailto:g4mba5 at gmail.com>> ha scritto:
> 
> 
>     SDL2 is supposed to be able to load almost any image format. For TIFF
>     format, the documentation says that the library is loaded
>     dynamically at
>     runtime. I can't say more.
> 
>     https://www.libsdl.org/projects/SDL_image/
>     <https://www.libsdl.org/projects/SDL_image/>
> 
>     As for saving a JPEG image, you must use the 'gb.image.io
>     <http://gb.image.io>' component.
> 
>     Regards,
> 
>     -- 
>     Benoît Minisini
> 
> 
> Hi Benoit,
> 
> I thank you very much for the answer, but here the malfunction doesn't 
> happen in the saving, it happens when loading the TIF file.
> Saving works even with only gb.image, as the file I attached on vuott's 
> code seems to show.

It's just because gb.sdl2 have a Image.Save() method that write a BMP 
file only.

> 
> Why does it work for Martin and not for me, what could be the reason?

No idea.

> Why is the gb.sdl2 component incompatible with gb.gui, gb.gui.qt etc.?

Because it's a GUI component like them. You can't use Qt and SDL at the 
same time, it's a non-sense (same thing for GTK+).

Regards,

-- 
Benoît Minisini


More information about the User mailing list