]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
switching to LaunchServices implementation, fixes #11508
[wxWidgets.git] / src / common / image.cpp
index cc63e385c150cccf190b85b31b27e477dd74a7d1..6dddaefb3c764b236070e6d788f0981adf790106 100644 (file)
@@ -2341,8 +2341,6 @@ bool wxImage::DoLoad(wxImageHandler& handler, wxInputStream& stream, int index)
     if ( !handler.LoadFile(this, stream, true/*verbose*/, index) )
         return false;
 
     if ( !handler.LoadFile(this, stream, true/*verbose*/, index) )
         return false;
 
-    M_IMGDATA->m_type = handler.GetType();
-
     // rescale the image to the specified size if needed
     if ( maxWidth || maxHeight )
     {
     // rescale the image to the specified size if needed
     if ( maxWidth || maxHeight )
     {
@@ -2363,6 +2361,9 @@ bool wxImage::DoLoad(wxImageHandler& handler, wxInputStream& stream, int index)
             Rescale(width, height, wxIMAGE_QUALITY_HIGH);
     }
 
             Rescale(width, height, wxIMAGE_QUALITY_HIGH);
     }
 
+    // Set this after Rescale, which currently does not preserve it
+    M_IMGDATA->m_type = handler.GetType();
+
     return true;
 }
 
     return true;
 }