3rd party listings/resources? (e.g. wxImageHandler supplemental.) Not wxCode.

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
Mick P.
Earned some good credits
Earned some good credits
Posts: 145
Joined: Thu Jun 06, 2019 3:41 am
Contact:

3rd party listings/resources? (e.g. wxImageHandler supplemental.) Not wxCode.

Post by Mick P. »

Sorry again, web search is failing me. I know there is a good looking third-party SVG component for wxWidgets integration... I've seen it... but I don't know, where is a place to find out what third-party options are available to wxWidget users? (I see wxCode. http://wxcode.sourceforge.net/index.php)

I think there must be some wxImageHandler code out there, or is that something that would be immediately added to the core library if it existed?

I'm porting some software from Qt, and comparing the image formats it is able to load to wxWidgets. There are some in the list like webp, that if possible I'd rather not strike from the list of prior supported image formats.
DavidHart
Site Admin
Site Admin
Posts: 4252
Joined: Thu Jan 12, 2006 6:23 pm
Location: IoW, UK

Re: 3rd party listings/resources? (e.g. wxImageHandler supplemental.) Not wxCode.

Post by DavidHart »

Hi,

Not a self-contained component so probably not what you're looking for, but I incorporated some librsvg code into my program: see this commit (and, I've just noticed, s/svn/svg/g in the commit message :().

Regards,

David
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: 3rd party listings/resources? (e.g. wxImageHandler supplemental.) Not wxCode.

Post by doublemax »

Currently there is no good and easy way to render SVGs in wxWidgets. There is wxSVG, which is good a good renderer, but it has some additional dependencies, which makes it unacceptable - at least for me - under Windows.
https://github.com/AntumDeluge/wxSVG
If it would support a wxGraphicsContext based renderer, i think it could be integrated into wxWidgets. We just need to find someone who does it. Any volunteers? ;)

I personally use nanosvg at the moment, which is a small, header-only renderer, but it doesn't support all SVG features, so quite a few SVGs won't look right.
https://github.com/memononen/nanosvg
Use the source, Luke!
Mick P.
Earned some good credits
Earned some good credits
Posts: 145
Joined: Thu Jun 06, 2019 3:41 am
Contact:

Re: 3rd party listings/resources? (e.g. wxImageHandler supplemental.) Not wxCode.

Post by Mick P. »

SVG is just something I mentioned incidentally as an example of a third-party component (wxSVG) that I'm aware of. I'm looking for links to other projects that I'm not aware of. Especially image format loaders, since that's uncomplicated.

With software that displays images, typically you just want to have as many bases covered as you possibly can to satisfy end-users. I'm curious if wxWidgets is drawing the line at common/public image formats, or if no one has bothered to implement other formats in all of its history. For me I'm implementing COLLADA that places no restrictions on image formats, so if a document includes an image it will not display if the image cannot be loaded.
Mick P.
Earned some good credits
Earned some good credits
Posts: 145
Joined: Thu Jun 06, 2019 3:41 am
Contact:

Re: 3rd party listings/resources? (e.g. wxImageHandler supplemental.) Not wxCode.

Post by Mick P. »

I got to wondering if any SVG libraries might have a sane pathway for file formats, since SVG should (I believe) be able to display "any" file format (like COLLADA.) I suspect not. Cairo seems to be able to partially open image files on a file system, but not in memory or via a generic I/O stream. I really question the fitness of libraries written like that. wxSVG uses wxWidgets to open image files. So that would not buy me anything.

A COLLADA reference implementation I am the current maintainer of (COLLADA-DOM) inherited DevIL (OpenIL) but I am bit at the end of my rope with it since it puts the burden of wrangling its dependencies on consumers. It supports like maybe 30 file formats, but that's 30 separate projects to hunt down, since it doesn't actually implement any of them, or try to make life easier for consumers. Of course, on Linux systems with comprehensive packages most of those are in the package library. I would prefer to make it an optional dependency, and use wxWidgets instead.

But it leaves me wanting for more. All image displaying software is in the same boat. You might think they would have combined their forces and come up with a solution for this by now. The more obscure formats are the real difficulty. There's no shortage of coverage of basic formats. But the obscure ones are usually not just evolutionary dead ends... they serve a specific purpose... which is why their absence is missed.
Post Reply