SaveImage() to work with ImageID

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

SaveImage() to work with ImageID

Post by IdeasVacuum »

an ImageID (the OS handle), whereas

SaveImage() works with a PB Image number only, but if the image has been manipulated, the code has mostly likely used an OS ImageID (handle). It would therefore save hassle if SaveImage() also worked with an OS ImageID.

Edit: (re srod's remark below) Similarly, GetGadgetState(#MyImageGadget) only returns an OS ImageID. In my view, GetGadgetState(#MyImageGadget) should always return a PB Image Number.

A quick search of the forum reveals a bit of developer confusion generally since the Help does not always distinguish between the OS ImageID (handle) and the PB Image Number. Had the ImageID() function been named differently, something like ImageOsHandle(), that might have helped understanding a little bit.
Last edited by IdeasVacuum on Mon Aug 06, 2012 3:41 am, edited 1 time in total.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: SaveImage() to work with ImageID

Post by srod »

GetGadgetState() doesn't return a PB image number here for an image gadget; it returns a DIBsection handle, i.e. an OS handle.
I may look like a mule, but I'm not a complete ass.
Post Reply