X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/646c4aebb22c4b60f71b7c30c2eedfa6328888f4..e4f1a68ad1a4c145878a7595c06859d3d59fc6e7:/src/common/image.cpp diff --git a/src/common/image.cpp b/src/common/image.cpp index d9f07d30b2..b24e45100f 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -7,7 +7,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "image.h" #endif @@ -219,6 +219,11 @@ wxImage wxImage::Copy() const memcpy( data, GetData(), M_IMGDATA->m_width*M_IMGDATA->m_height*3 ); + // also copy the image options + wxImageRefData *imgData = (wxImageRefData *)image.m_refData; + imgData->m_optionNames = M_IMGDATA->m_optionNames; + imgData->m_optionValues = M_IMGDATA->m_optionValues; + return image; }