SaveImage() to work with ImageID
Posted: Sun Aug 05, 2012 3:26 pm
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.
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.