From e25758582e49c1887fcde4c16da761428fe6f5fa Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 13 Apr 2022 09:30:31 +0200 Subject: Fix for issue #427 - continued. --- src/Fl_Pixmap.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Fl_Pixmap.cxx') diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index 59e69bc97..e6c6cc4c3 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -131,11 +131,10 @@ Fl_Image *Fl_Pixmap::copy(int W, int H) { return new Fl_Pixmap((char *const*)0); } // Optimize the simple copy where the width and height are the same... - if (W == w() && H == h()) { + if (W == data_w() && H == data_h()) { // Make an exact copy of the image and return it... new_image = new Fl_Pixmap(data()); new_image->copy_data(); - new_image->scale(W, H, 0, 1); return new_image; } if (W <= 0 || H <= 0) return 0; -- cgit v1.2.3