If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
BTW, the copy constructor only References the image object. It does not make a new copy...
Also it's rather strange to create a new copy of the image object as every action which modifies the image will do that in place (non-const members) or return a new image (const-members). You should always check upon include/wx/image.h to see which one applies in your situation.
Last edited by KaReL on Wed Oct 19, 2005 6:03 am, edited 1 time in total.
wxImage * m_pOldImg = new wxImage( "image.bmp", wxBITMAP_TYPE_BMP, -1 );
wxImage * m_pNewImg = new wxImage(*m_pOldImg);
Yeah thats all very well but if you change the image data of old image it also affects the new image. Since the copy constructor does not create a new instance in memory of the image data.
KaRel, didnt see the copy function Oops yes that makes life easier hehe.