/**************************************************************************** * Func: trans_pgm * * * * Desc: translates a block in an image * * * * Params: buffer - pointer to image in memory * * out_buffer - pointer to output image in memory * * rows - number of rows in image * * cols - number of columns in image * * x_start - Upper left x coordinate of block to move * * y_start - Upper left y coordinate of block to move * * x_end - x coordinate of destination * * y_end - y coordinate of destination * * width - width of block to move * * height - height of block to move * ****************************************************************************/ void trans_pgm(image_ptr buffer, image_ptr out_buffer, int rows, int cols, int x_start, int y_start, int x_end, int y_end, int width, int height) { int x,y; /* column and row indices in image */ unsigned long sourceadd, destadd;/* address in source and dest images */ unsigned long index; /* index into images */ /* copy source image to destination */ index = 0; for(y=0; y