Discussion:
GDIPlus - add a webp image decoder ?
(too old to reply)
R.Wieser
2023-11-26 08:43:40 UTC
Permalink
Hello all,

Some time ago I stumbled over a few webp images. After some some
websearching I found a dll which could decode them into a raw byte arrays,
and with help of GDI+ I was able to save that into a native format (jpg,
png, etc), allowing me to view the resulting images.


While doing the above I was (again) made aware that GDI+ has(?) installable
image decoders & encoders. So, I thought it would be an idea to see if I
could write-and-install a webp decoder to that list.

The thing is, I can't seem to find anything of worth regarding native GDI+
installable image decoders, and only very little about a WIC type of
decoder. At least not enough to be able to get a complete picture about
what needs to be done.


So, I'm wondering if anyone here knows anything about how to create,
preferrably, a native GDI+ decoder - though information about how to create
WIC type of decoder is quite welcome too. (I'm an Assembly programmer, which
is why I rather work with the former than the latter)

Regards,
Rudy Wieser
JJ
2023-11-27 03:59:09 UTC
Permalink
Post by R.Wieser
Hello all,
Some time ago I stumbled over a few webp images. After some some
websearching I found a dll which could decode them into a raw byte arrays,
and with help of GDI+ I was able to save that into a native format (jpg,
png, etc), allowing me to view the resulting images.
While doing the above I was (again) made aware that GDI+ has(?) installable
image decoders & encoders. So, I thought it would be an idea to see if I
could write-and-install a webp decoder to that list.
The thing is, I can't seem to find anything of worth regarding native GDI+
installable image decoders, and only very little about a WIC type of
decoder. At least not enough to be able to get a complete picture about
what needs to be done.
So, I'm wondering if anyone here knows anything about how to create,
preferrably, a native GDI+ decoder - though information about how to create
WIC type of decoder is quite welcome too. (I'm an Assembly programmer, which
is why I rather work with the former than the latter)
Regards,
Rudy Wieser
You can learn from examples, such as below PGM WIC codec.

https://github.com/vbaderks/netpbm-wic-codec
R.Wieser
2023-11-27 07:08:45 UTC
Permalink
JJ,
Post by JJ
Post by R.Wieser
So, I'm wondering if anyone here knows anything about how to create,
preferrably, a native GDI+ decoder - though information about how to create
WIC type of decoder is quite welcome too. (I'm an Assembly programmer, which
is why I rather work with the former than the latter)
You can learn from examples, such as below PGM WIC codec.
https://github.com/vbaderks/netpbm-wic-codec
Thanks for the link.

Thoug part of the problem with the WIC style approach is that I would need
to figure out what the methods and properties of each of the used objects is
(in vtable order!) - which is normally not something thats part of such an
example.

(I've had to do similar often enough to know its a hit-or-miss kind of thing
trying to google for it ...)

Nonetheless, its more than I had before. :-)

Regards,
Rudy Wieser
JJ
2023-11-28 01:12:04 UTC
Permalink
Post by R.Wieser
Thanks for the link.
Thoug part of the problem with the WIC style approach is that I would need
to figure out what the methods and properties of each of the used objects is
(in vtable order!) - which is normally not something thats part of such an
example.
(I've had to do similar often enough to know its a hit-or-miss kind of thing
trying to google for it ...)
Nonetheless, its more than I had before. :-)
AFAIK, in the reference part of Microsoft SDK documentations, the list of
methods of an interface is always in VTable order. You can still check the
relevant C header file if you have doubts.
R.Wieser
2023-11-28 06:54:55 UTC
Permalink
JJ,
Post by JJ
AFAIK, in the reference part of Microsoft SDK documentations, the
list of methods of an interface is always in VTable order. You can
still check the relevant C header file if you have doubts.
As mentioned, I've googled quite a bit in search of how to "talk to"
objects. And it always was a problem finding the vtbale information, even
for common MS objects.

But if you know where I can find on-line Microsoft SDK documentation I would
be much obliged.

Currently the most pertinent information I can find is learn.microsoft.com,
but even that one has its problems. Just yesterday I was having a problem
with a standard GDI+ function, GdipCreateBitmapFromScan0 . Try to find some
MS documentation about it (and its sibblings) and you get nowhere fast. :-(

Regards,
Rudy Wieser

Loading...