• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Undocumented API to convert image file format between GIF/BMP/JPG/PNG.

Started by Patrice Terrier, October 07, 2009, 02:51:49 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

Convert image file format between GIF/BMP/JPG/PNG.

Wrapper for the undocumented SHConvertGraphicsFile function found in shlwapi.dll version >= 6.00

Source code is in the attached ZIP file.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

For your information, i have written gConvert to create full 32-bit ARGB bitmap (from transparent PNG file), that will be used with the next WinLIFT WSA API skAlphablend.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

José Roca

 
I suggest to change the name of the TrueOrFalse parameter to something more explanatory, such bOverwrite.

Patrice Terrier

Yes, the last parameter is a boolean flag, %TRUE means OverWrite destination.

Indeed I am always using it in OverWrite mode myself.

...

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

José Roca

 
I have read that it doesn't work with Windows 7. Is that true?

Pierre Bellisle

I did some test,

with GetProcAddress
- Vista   32: Conversion OK
- Seven 32: No adress returned
- Seven 64: No address returned

With GetProcAddressDirectly by Semen
- Vista  32: Conversion OK
- Seven32: GPF
- Seven64: GPF

Maybe some update to Seven made it unusable.

Patrice, is it still working on your Seven ?

Patrice Terrier

I just checked with the current version of Seven, and you and José are correct, it doesn't work anymore with it :-[

That's the problem with undocumented API, it could be changed at any time without prior notification.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Pierre Bellisle

Well, we still have GDI+.

Speaking of...
I just downloaded José's help file.

One word José...

Thank you, thank you, thank you.