Commit b8e862cb authored by Michael Natterer's avatar Michael Natterer Committed by Michael Natterer

when resizing, don't advance the "data" pointer of regions of contiguous

2007-10-23  Michael Natterer  <mitch@gimp.org>

	* app/base/pixel-region.c (pixel_region_resize): when resizing,
	don't advance the "data" pointer of regions of contiguous data. I
	should have made this change along with my pixel region cleanup of
	2005-09-03 which sanitized pixel regions of contiguous data.
	Fixes bug #489229.

	* libgimp/gimppixelrgn.c (gimp_pixel_rgn_resize): remove the same
	code here (the removed code was dead since this function refuses
	to be called on pixel regions without a drawable).


svn path=/trunk/; revision=23922
parent f50e06a4
2007-10-23 Michael Natterer <mitch@gimp.org>
* app/base/pixel-region.c (pixel_region_resize): when resizing,
don't advance the "data" pointer of regions of contiguous data. I
should have made this change along with my pixel region cleanup of
2005-09-03 which sanitized pixel regions of contiguous data.
Fixes bug #489229.
* libgimp/gimppixelrgn.c (gimp_pixel_rgn_resize): remove the same
code here (the removed code was dead since this function refuses
to be called on pixel regions without a drawable).
2007-10-23 Sven Neumann <sven@gimp.org>
* app/core/gimpdrawable-combine.c: formatting.
......@@ -123,12 +123,6 @@ pixel_region_resize (PixelRegion *PR,
gint w,
gint h)
{
/* If the data is non-null, data is contiguous--need to advance */
if (PR->data != NULL)
PR->data += ((y - PR->y) * PR->rowstride +
(x - PR->x) * PR->bytes);
/* update sizes for both contiguous and tiled regions */
PR->x = x;
PR->y = y;
PR->w = w;
......
......@@ -159,12 +159,6 @@ gimp_pixel_rgn_resize (GimpPixelRgn *pr,
g_return_if_fail (x >= 0 && x + width <= pr->drawable->width);
g_return_if_fail (y >= 0 && y + height <= pr->drawable->height);
/* If the data is non-null, data is contiguous--need to advance */
if (pr->data != NULL)
pr->data += ((y - pr->y) * pr->rowstride +
(x - pr->x) * pr->bpp);
/* update sizes for both contiguous and tiled regions */
pr->x = x;
pr->y = y;
pr->w = width;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment