Saving the Whole Image after Zooming

Snowbound Software’s RasterMaster™ for the Java™ Platform includes the ability to zoom in and out of an image.

After zooming in or out of an image, you can save the entire image. Zooming in RasterMaster is accomplished by setting the crop rectangle. When RasterMaster saves, it saves only what is on the crop rectangle. The following code demonstrates how RasterMaster saves what is in the crop rectangle:

old_xpos = dis_crop_xs; /* crop x start */

old_ypos = dis_crop_ys; /* crop y start */

old_width = dis_crop_xe; /* crop xsize */

old_height = public int dis_crop_ye;

set_croprect(0,0,image_width,image_height);

IMG_save_bitmap()

IMG_set_croprect(old_xpos,old_ypos,old_width,old_height);

Category:

Online Demo