I've done some playing around with the IPicture API provided by windows. It's a fairly usefull interface, as it can load the .bmp. .ico, .wmf, .gif (still only), and .,jpg formats. Even better, since the compression parts of the .gif file format reside inside the OS, there should be no royality issues in using this in commercial code.
What I was thinking of was library additions suitable for MASM32 that would load an image from either a resource, a file, or a memory blob, and in each case return a hBitmap handle to the image.
This way, all the messy COM details get abstracted away safely inside the library boundaries, letting those non-COMmies have access to this powerful technique.
With that said, I would appreciate any input you may have if you would use such a library, so I can design it with the best possible reuse possibilities.
What I was thinking of was library additions suitable for MASM32 that would load an image from either a resource, a file, or a memory blob, and in each case return a hBitmap handle to the image.
This way, all the messy COM details get abstracted away safely inside the library boundaries, letting those non-COMmies have access to this powerful technique.
With that said, I would appreciate any input you may have if you would use such a library, so I can design it with the best possible reuse possibilities.
Ernie,
I think a library of this type would be a great idea as non BMP image handling is no joy to do. If it could handle both disk files and raw memory images it would be a powerful and useful tool to have available.
Regards,
hutch@movsd.com
I think a library of this type would be a great idea as non BMP image handling is no joy to do. If it could handle both disk files and raw memory images it would be a powerful and useful tool to have available.
Regards,
hutch@movsd.com
How about something like:
Thomas
GetBitmapFromImageFile(lpFileName)
GetBitmapFromImageResource(hInstance, lpRes/resID)
GetBitmapFromImageMem(lpMem,dwSize)
Thomas
Well.... that wasn't so bad. I already have the routines hacked out, they seem to work well, but I've learned the hard way never to release baby fresh code.
Look back tomorrow for a beta.
While working on this, I had another thought... see here.
Look back tomorrow for a beta.
While working on this, I had another thought... see here.
Mmm didnt know that if a functionality resides in the OS itself you dont need to pay royalties.
Will that work for MP3 too?
Will that work for MP3 too?
Mmm didnt know that if a functionality resides in the OS itself you dont need to pay royalties.
Will that work for MP3 too?