Presuming you mean wx.Bitmap, the attributes are currently ClassName, Depth, Height, Mask, Palette, Size, SubBitmap, Width, this, and thisown
Probably at a minimum you should compare Depth, Height, Width, and this. I don't know about Size, but if you do, realize that it also has a swig object inside.
Anyway, I'd figure the data must be inside 'this', which is a "<Swig Object of type 'wxBitmap *'>
I don't yet know how you compare raw memory buffers in Python, but I'm sure there's a way. Clearly, you'll have to do some arithmetic to decide how much data is at each pointer.
Good luck,
DaveA
Steven Sproat wrote:
ยทยทยท
I have two bitmaps in two different objects, at two different memory locations. They both came from a pasted image data object, and I'm currently saving any image the user pastes. I write the image to disk, and store the path inside the object.
What I'd like to do is only save the image once, by identifying objects with common image data. Then I can update the common objects with the same file path, so they're all pointing to the single image, but each have their unique x/y attributes and such.
It seems that currently, doing bitmap1 == bitmap2 will return false, as they're testing for reference, rather than value. I've looked through the bitmap objects with dir(), but don't know where the actual image data resides
Any ideas? sorry for the few questions today, I'm pretty stuck here
cheers,
Steven