[Wavelet-commit] Wavelet/WImage ColorImage.hh, 1.9, 1.10 Image.hh, 1.21, 1.22
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2009-05-28 13:15:53
|
Update of /cvsroot/wavelet/Wavelet/WImage In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv2712/WImage Modified Files: ColorImage.hh Image.hh Log Message: fixed bug in mirror extend function for resizing, added another fill strategy Index: Image.hh =================================================================== RCS file: /cvsroot/wavelet/Wavelet/WImage/Image.hh,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Image.hh 28 May 2009 09:07:13 -0000 1.21 --- Image.hh 28 May 2009 12:21:32 -0000 1.22 *************** *** 59,62 **** --- 59,68 ---- /** + * Enumeration on built-in extension functions (implementations of the + * ResizeFillFunc type above). + */ + enum ExtendFunc { ef_mirror, ef_outerBorder }; + + /** * An image (abstract). A (grey-scale) more-than-one-dimensional image. */ *************** *** 598,601 **** --- 604,608 ---- * given color or alternatively the resulting image will be smaller * than the target dimensions keeping its aspect ratio. + * This method is deprecad. Use the one with the enumeration ar instead. * @exception invalid_argument * the factor is negative or the function argument is invalid *************** *** 608,612 **** * @param function interpolation function (0: bilinear interpolation, * 1: average, 2: nearest neighbour). ! * @return a new rescaled image */ virtual Image *fitInto (int rows, int cols, bool mirrorExtend, int function = 0) const; --- 615,620 ---- * @param function interpolation function (0: bilinear interpolation, * 1: average, 2: nearest neighbour). ! * @return a new rescaled image ! */ virtual Image *fitInto (int rows, int cols, bool mirrorExtend, int function = 0) const; *************** *** 621,624 **** --- 629,651 ---- * @param rows the target number of rows * @param cols the target number of columns + * @param extend the type of extension function used if the aspect + * ratio does not match + * (else the a smaller image size will be chosen if the aspect ratio + * does not match) + * @param function interpolation function (0: bilinear interpolation, + * 1: average, 2: nearest neighbour). + * @return a new rescaled image */ + virtual Image *fitInto (int rows, int cols, ExtendFunc extend, + int function = 0) const; + + /** Produce a scaled version of the image which just fits into + * the given dimensions. If the aspect ratio does not fit into + * the new dimensions the remaining areas can be filled with a + * given color or alternatively the resulting image will be smaller + * than the target dimensions keeping its aspect ratio. + * @exception invalid_argument + * the factor is negative or the function argument is invalid + * @param rows the target number of rows + * @param cols the target number of columns * @param fillFunc if not NULL a function for filling otherwise empty regions * (else the a smaller image size will be chosen if the aspect ratio Index: ColorImage.hh =================================================================== RCS file: /cvsroot/wavelet/Wavelet/WImage/ColorImage.hh,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ColorImage.hh 12 Apr 2009 16:57:53 -0000 1.9 --- ColorImage.hh 28 May 2009 12:21:31 -0000 1.10 *************** *** 253,256 **** --- 253,275 ---- * @param rows the target number of rows * @param cols the target number of columns + * @param extend the type of extension function used if the aspect + * ratio does not match + * (else the a smaller image size will be chosen if the aspect ratio + * does not match) + * @param function interpolation function (0: bilinear interpolation, + * 1: average, 2: nearest neighbour). + * @return a new rescaled image */ + virtual ColorImage *fitInto (int rows, int cols, ExtendFunc extend, + int function = 0) const; + + /** Produce a scaled version of the image which just fits into + * the given dimensions. If the aspect ratio does not fit into + * the new dimensions the remaining areas can be filled with a + * given color or alternatively the resulting image will be smaller + * than the target dimensions keeping its aspect ratio. + * @exception invalid_argument + * the factor is negative or the function argument is invalid + * @param rows the target number of rows + * @param cols the target number of columns * @param fillFunc if not NULL a function for filling otherwise empty regions * (else the a smaller image size will be chosen if the aspect ratio |