[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 00:55:14 CET 2022


Le 10/03/2022 à 13:34, Gianluigi a écrit :
> In an attempt to answer this e-mail
> https://lists.gambas-basic.org/pipermail/user/2022-March/075615.html 
> <https://lists.gambas-basic.org/pipermail/user/2022-March/075615.html>
> I tried to create a project that, using gb.sdl2 through a library, would 
> change a TIF file into BMP and then use gb.image to obtain a compressed 
> JPEG file.
> It seems impossible, the library alone works, but when inserted in a 
> project it does not load the TIF image (ERROR: Unable to load image).
> 
> I attach here the complete zipped project:
> https://paste.c-net.org/LashedEarplugs 
> <https://paste.c-net.org/LashedEarplugs>
> 
> Note: you must import the .gambas library inside the TestTiff project.
> 
> Regards
> Gianluigi
> 
> 
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----

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/

As for saving a JPEG image, you must use the 'gb.image.io' component.

Regards,

-- 
Benoît Minisini


More information about the User mailing list