Added wxIMAGE_OPTION_ORIGINAL_{WIDTH,HEIGHT} wxImage options.
These options allow to retrieve the original image size if the image was scaled during load. Closes #13662. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69759 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -944,10 +944,14 @@ void MyFrame::OnThumbnail( wxCommandEvent &WXUNUSED(event) )
|
||||
return;
|
||||
}
|
||||
|
||||
int origWidth = image.GetOptionInt( wxIMAGE_OPTION_ORIGINAL_WIDTH );
|
||||
int origHeight = image.GetOptionInt( wxIMAGE_OPTION_ORIGINAL_HEIGHT );
|
||||
|
||||
const long loadTime = sw.Time();
|
||||
|
||||
MyImageFrame * const frame = new MyImageFrame(this, filename, image);
|
||||
wxLogStatus(frame, "Loaded \"%s\" in %ldms", filename, loadTime);
|
||||
wxLogStatus(frame, "Loaded \"%s\" in %ldms; original size was (%d, %d)",
|
||||
filename, loadTime, origWidth, origHeight);
|
||||
#else
|
||||
wxLogError( wxT("Couldn't create file selector dialog") );
|
||||
return;
|
||||
|
Reference in New Issue
Block a user