Diff of /src/vips/resample.c [c853f7] .. [6986bf] Maximize Restore

  Switch to side-by-side view

--- a/src/vips/resample.c
+++ b/src/vips/resample.c
@@ -221,6 +221,19 @@
     	return -1;
 	if (im_pincheck (in))
     	return -1;
+
+	IMAGE *inXpnd = im_open_local(out, "inXpnd", "p");  	
+	if (im_poutcheck (inXpnd))
+    	return -1;
+
+	/*printf("b4 embedding\n");*/
+	if(im_embed( in, inXpnd, 1, *intType, *intType, in->Xsize + *intType, in->Ysize + *intType ))
+		return (-1);
+	/*else
+	{
+		printf("embedding successful: new height: %d, new width %d\n", inXpnd->Xsize, inXpnd->Ysize);
+	}*/
+
 	/*printf("after checking IO\n");*/
 
 	if (coordinate->Coding != IM_CODING_NONE ||
@@ -230,13 +243,13 @@
       	return -1;
     }
 
-  	if (in->Coding != IM_CODING_NONE || in->BandFmt != IM_BANDFMT_UCHAR)
+  	if (inXpnd->Coding != IM_CODING_NONE || inXpnd->BandFmt != IM_BANDFMT_UCHAR)
     {
       	im_error ("output_resample_image", "bad input image");
       	return -1;
     }
 
-	if (im_cp_desc (out, in))
+	if (im_cp_desc (out, inXpnd))
     	return -1;
 
   	out->Xsize = coordinate->Xsize;
@@ -251,11 +264,10 @@
 		IM_CODING_NONE, IM_TYPE_B_W, 1.0, 1.0, 0, 0 );
 
 	/*printf("b4 calling demand\n");*/
-
-
-	if( im_demand_hint( out, IM_SMALLTILE, coordinate, in, NULL ) )
-		return( -1 );
-	if( !(vec = im_allocate_input_array( out, coordinate, in, NULL )) )
+	
+	if( im_demand_hint( out, IM_SMALLTILE, coordinate, inXpnd, NULL ) )
+		return( -1 );
+	if( !(vec = im_allocate_input_array( out, coordinate, inXpnd, NULL )) )
 		return( -1 );
 	
 	/*printf("b4 calling generate function\n");*/