Page 1 of 1

SaveImage() to work with ImageID

Posted: Sun Aug 05, 2012 3:26 pm
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.

Re: SaveImage() to work with ImageID

Posted: Sun Aug 05, 2012 4:49 pm
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.