branch:
details: http://panotools.hg.sourceforge.net/hgweb/panotools/panotools/hgroot/panotools/libpano/rev/e63acb0227b7
changeset: 766:e63acb0227b7
user: Jim Watters <jwatters@...>
date: Mon Nov 19 22:37:34 2012 -0400
description:
Fix a bug when cropping images that go outside the image boundry.
mp->horizontal & mp->vertical would otherwise get extrordinary large.
diffstat:
adjust.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diffs (14 lines):
diff -r c9f63bc558e9 -r e63acb0227b7 adjust.c
--- a/adjust.c Tue Sep 18 19:51:44 2012 +0200
+++ b/adjust.c Mon Nov 19 22:37:34 2012 -0400
@@ -646,8 +646,8 @@
{
image_selection_width = im->selection.right - im->selection.left;
image_selection_height = im->selection.bottom - im->selection.top;
- mp->horizontal += (im->selection.right + im->selection.left - im->width)/2.0;
- mp->vertical += (im->selection.bottom + im->selection.top - im->height)/2.0;
+ mp->horizontal += (im->selection.right + im->selection.left - (int32_t)im->width)/2.0;
+ mp->vertical += (im->selection.bottom + im->selection.top - (int32_t)im->height)/2.0;
}
}
|