[Gambas-user] Is it possible to use a library that uses gb.sdl2 in a graphic project?
vuott at tutanota.com
vuott at tutanota.com
Thu Mar 10 18:03:33 CET 2022
« but I would like to find a way to do this, using only Gambas code. »
Well,
maybe by using gb.media Component:
*************
Public Sub Main()
Dim pl As New MediaPipeline
Dim src, deb, vdc, enc, snk As MediaControl
Dim primofile As String
primofile = "/tmp/primofile"
src = New MediaControl(pl, "filesrc")
src["location"] = "/path/of/file.tif"
deb = New MediaControl(pl, "decodebin")
vdc = New MediaControl(pl, "videoconvert")
enc = New MediaControl(pl, "avenc_bmp")
snk = New MediaControl(pl, "filesink")
snk["location"] = primofile
src.LinkTo(deb)
deb.LinkLaterTo(vdc)
vdc.LinkTo(enc)
enc.LinkTo(snk)
pl.Play()
Repeat
Wait 0.01
Until Stat(primofile).Size > 0
Copy primofile To "/tmp/new/file.bmp"
pl.Close
End
******************************
10 mar 2022, 16:57 da bagonergi at gmail.com:
>
>
> Il giorno gio 10 mar 2022 alle ore 14:11 Martin Belmonte <> mbelmonte at belmotek.net> > ha scritto:
>
>> El 10/3/22 a las 13:34, Gianluigi escribió:
>> > TIF file into BMP
>> Hi, I solve the problem using the freeimage library, for that i take the
>> code from the Italian forum but i modify it to use as Task class.
>> Maybe it will be useful for you.
>>
>> ' Gambas class file
>>
>> '''Images convertion class. To be used in conjunction with gb.Task
>>
>> Inherits Task
>> ....
>>
>
> :-D the great vuott...
> I thank you very much, but I would like to find a way to do this, using only Gambas code.
> When I have time I will try using gb.dbus, to try to work around the problem.
>
> Regards
> Gianluigi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220310/6621b574/attachment.htm>
More information about the User
mailing list