"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libvips/conversion/zoom.c" between
vips-8.10.6.tar.gz and vips-8.11.0.tar.gz

About: VIPS is a free image processing system (see also the GUI nip2).

zoom.c  (vips-8.10.6):zoom.c  (vips-8.11.0)
skipping to change at line 56 skipping to change at line 56
*/ */
/* /*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/ */
/* /*
* TODO: #define DEBUG
* Test for pixel size and use memcpy() on individual pixels once they reach #define DEBUG_VERBOSE
* sizes of the order of tens of bytes. char-wise copy is quicker than
* memcpy() for smaller pixels.
*
* Also, I haven't tested it but int-wise copying may be faster still, as
* long as alignment permits it.
*
* tcv. 2006-09-01
*/
/* Turn on ADDR() range checks.
#define DEBUG 1
*/ */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
#endif /*HAVE_CONFIG_H*/ #endif /*HAVE_CONFIG_H*/
#include <vips/intl.h> #include <vips/intl.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
skipping to change at line 257 skipping to change at line 246
/* Output area we are building. /* Output area we are building.
*/ */
const VipsRect *r = &or->valid; const VipsRect *r = &or->valid;
const int ri = VIPS_RECT_RIGHT( r ); const int ri = VIPS_RECT_RIGHT( r );
const int bo = VIPS_RECT_BOTTOM(r); const int bo = VIPS_RECT_BOTTOM(r);
VipsRect s; VipsRect s;
int left, right, top, bottom; int left, right, top, bottom;
int width, height; int width, height;
#ifdef DEBUG_VERBOSE
printf( "vips_zoom_gen: left=%d, top=%d, width=%d, height=%d\n",
r->left, r->top, r->width, r->height );
#endif /*DEBUG_VERBOSE*/
/* Area of input we need. We have to round out, as we may have /* Area of input we need. We have to round out, as we may have
* part-pixels all around the edges. * part-pixels all around the edges.
*/ */
left = VIPS_ROUND_DOWN( r->left, zoom->xfac ); left = VIPS_ROUND_DOWN( r->left, zoom->xfac );
right = VIPS_ROUND_UP( ri, zoom->xfac ); right = VIPS_ROUND_UP( ri, zoom->xfac );
top = VIPS_ROUND_DOWN( r->top, zoom->yfac ); top = VIPS_ROUND_DOWN( r->top, zoom->yfac );
bottom = VIPS_ROUND_UP( bo, zoom->yfac ); bottom = VIPS_ROUND_UP( bo, zoom->yfac );
width = right - left; width = right - left;
height = bottom - top; height = bottom - top;
s.left = left / zoom->xfac; s.left = left / zoom->xfac;
 End of changes. 2 change blocks. 
13 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)