upsize_0


site : http://registry.gimp.org/node/19582

version : March 25, 2011

Windows binaries : upsize_0.exe tested with gimp 2.6.11 32 bits / Windows 7 64 bits,
                                            gimp 2.7.1 32 bits / Windows 7 64 bits
                                            gimp painter 2.6.11 32 bits / Windows 7 64 bits


*****************************************************************************************


auteurs : Nicolas Robidoux et Adam Turcotte

licence : http://creativecommons.org/licenses/by/2.5/ca/

accs : Image > Upsize



*****************************************************************************************


/*
 * Upsize -- image resizing plug-in for The Gimp image manipulation
 * program Copyright (C) 2009 Nicolas Robidoux and Adam Turcotte
 *
 * LAST UPDATED:
 * March 25, 2011
 *  - Fixed Smooth/Sharp radio button callback.
 *  - Uses gimp_image_insert_layer() for Gimp 2.7 and newer
 *     instead of gimp_image_add_layer(), which has been deprecated.
 *
 * INSTALLATION INSTRUCTIONS:
 * Make sure the libgimp2.0-dev package is installed, then type:
 * gimptool-2.0 --install upsize.c
 *
 * NOTE:
 * This current version of the code has some unneeded
 * redundancies. Manana.
 */

/*
 * Natural boundary conditions mean that the normal derivative of the
 * histopolant (average matching reconstructed intensity profile) is
 * zero at the boundary. A alternate version of the code could use
 * not-a-knot boundary conditions instead (weaker variational
 * principle but would produce a scheme which is exact on affine
 * intensity profiles).
 */

/*
 * This source code can generate plug-ins which use either 16bit or
 * 8bit arrays to store the B-Spline coefficients after they have been
 * computed "in the vertical direction."
 *
 * More details: This tensor scheme requires one tridiagonal solve per
 * column, and one tridiagonal solve per row. The column solves are
 * performed first, with the results stored in integer arrays. The
 * results are retrieved when the row solves are performed.
 *
 * Storing the intermediate results in 8bit saves approximately half
 * of the memory compared to 16bit (not counting the input and output
 * images themselves), at the cost of introducing intensity errors
 * which are at most 1.
 *
 * If EIGHT_BIT_STORAGE is #defined, the half-computed B-spline
 * coefficients will be stored in an 8bit integer array. Otherwise,
 * they will be stored in a 16bit integer array.
 */
