[Gambas-user] SVG files in file browser filter

Bruce Steers bsteers4 at gmail.com
Thu Apr 8 14:29:13 CEST 2021


On Thu, 8 Apr 2021 at 03:31, Benoît Minisini <g4mba5 at gmail.com> wrote:

> Le 08/04/2021 à 02:20, John Anderson a écrit :
> > Using Gambas 3.15.2 on Linux Mint 20.1 Cinnamon - when I place a picture
> > box on a form and I want to load in an svg file from my image dataset -
> > the file browser filter for image files is missing *.svg.  It works ok
> > when I set the file browser filter to "All Files" - then I can select
> > the svg file and all works just fine; the svg image is handled properly.
> >
> > I know it's just an extra click to make it work, just wondering if it is
> > intentional that svg files are not included in the image file filter?
> > Maybe the file filter needs a tweak on a future release?
> >
> > Thanks
> >
> > -John
> >
>
> SVG files are not supported by the PictureBox control, and any of the
> other Picture properties.
>
> It's the underlying GUI toolkit that transforms the SVG file into a
> bitmap image with an arbitrary size.
>
> If you want to load a SVG file into a PictureBox, you have to load the
> file manually with the SVGImage class, and then convert it to an image
> or a picture.
>
> I may add support for SVG files in the future.
>
> Regards,
>
> --
> Benoît Minisini
>

It looks like some things very nearly do support it.

I had a look at FileView.class and saw lots of code like..
If SvgImage Then
  blah, blah
Else
  blah, blah
Endif

Seems odd what John is saying that "just select to view all files and
choose and svg image and it works"
Are you saying it's just "chance" that it works and cannot be guaranteed so
that why it's excluded from the image types?

Respects
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20210408/fabcf7eb/attachment.htm>


More information about the User mailing list