From b50e6e416e2b4cdc849ea6f24181094c0957d904 Mon Sep 17 00:00:00 2001 From: Paul Cornett Date: Wed, 16 Dec 2009 17:10:52 +0000 Subject: [PATCH] preserve type when loaded image is rescaled, #11543 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62900 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/image.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/common/image.cpp b/src/common/image.cpp index cc63e385c1..6dddaefb3c 100644 --- a/src/common/image.cpp +++ b/src/common/image.cpp @@ -2341,8 +2341,6 @@ bool wxImage::DoLoad(wxImageHandler& handler, wxInputStream& stream, int index) 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 ) { @@ -2363,6 +2361,9 @@ bool wxImage::DoLoad(wxImageHandler& handler, wxInputStream& stream, int index) Rescale(width, height, wxIMAGE_QUALITY_HIGH); } + // Set this after Rescale, which currently does not preserve it + M_IMGDATA->m_type = handler.GetType(); + return true; } -- 2.45.2