[ wxwindows-Bugs-1577388 ] 2.7.1 wxImage - new image scaling code issues

SourceForge.net noreply at sourceforge.net
Sat Oct 14 14:10:35 PDT 2006


Bugs item #1577388, was opened at 2006-10-14 21:10
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1577388&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Common
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Julian Brierley (julianbrierley)
Assigned to: Nobody/Anonymous (nobody)
Summary: 2.7.1 wxImage - new image scaling code issues

Initial Comment:
There are a couple of issues with the new higher
quality image scaling code that were introduced during
the tidy up of src/common/image.cpp in revision 1.230.

There are rounding issues in wxImage::ResampleBox() and
wxImage::BlurHorizontal() is missing a *3 when
calculating pixel position in data.

The following gets it working again:

diff image.2.7.1.cpp image.cpp
574c574
<             for ( int j = src_y - scale_factor_y_2 + 1;
---
>             for ( int j = int(src_y -
scale_factor_y/2.0 + 1);
582c582
<                 for ( int i = src_x -
scale_factor_x_2 + 1;
---
>                 for ( int i = int(src_x -
scale_factor_x/2.0 + 1);
851c851
<             dst = dst_data + x*3 + y*M_IMGDATA->m_width;
---
>             dst = dst_data + x*3 +
y*M_IMGDATA->m_width*3;


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1577388&group_id=9863




More information about the wx-dev mailing list