[Wavelet-commit] Wavelet ImageResizer.cc,1.4,1.5
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2007-09-21 08:13:54
|
Update of /cvsroot/wavelet/Wavelet In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv25537 Modified Files: ImageResizer.cc Log Message: fixed incorrect filling in ImageResizer Index: ImageResizer.cc =================================================================== RCS file: /cvsroot/wavelet/Wavelet/ImageResizer.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** ImageResizer.cc 24 Aug 2007 15:24:28 -0000 1.4 --- ImageResizer.cc 21 Sep 2007 08:13:49 -0000 1.5 *************** *** 193,225 **** if (ysize != tmp->rows () || xsize != tmp->cols ()) { ! ColorImage *result = NEW (ColorImage (ysize, xsize, ! tmp->colors (), tmp->colormodel ())); result->paste (yoffs, xoffs, *tmp); - if (ysize > tmp->rows ()) - { - int fillRows = (result->rows () - tmp->rows () + 1) / 2; - - result->fill (m_fill, - 0, 0, - fillRows, result->cols ()); - - result->fill (m_fill, - tmp->rows () + fillRows, 0, - result->rows (), result->cols ()); - } - else - { - int fillCols = (result->cols () - tmp->cols () + 1) / 2; - - result->fill (m_fill, - 0, 0, - result->rows (), fillCols); - - result->fill (m_fill, - 0, tmp->cols () + fillCols, - result->rows (), result->cols ()); - } DELETE (tmp); return result; --- 193,202 ---- if (ysize != tmp->rows () || xsize != tmp->cols ()) { ! ColorImage *result = ! NEW (ColorImage (ysize, xsize, tmp->colors (), tmp->colormodel ())); + result->fill (m_fill, 0, 0, result->rows (), result->cols ()); result->paste (yoffs, xoffs, *tmp); DELETE (tmp); return result; |