| Top |
void zoom_fit_size (guint dest_width,guint dest_height,guint src_width,guint src_height,gboolean upscale_smaller,guint *width,guint *height);
Computes the final dimensions of an image that is to be scaled to fit to a
certain size. If upscale_smaller
is TRUE, then images smaller than the
destination size will be scaled up; otherwise, they will be left at their
original size.
dest_width |
Width of destination area. |
|
dest_height |
Height of destination area. |
|
src_width |
Width of source image. |
|
src_height |
Height of source image. |
|
upscale_smaller |
Whether to scale up images smaller than the destination size. |
|
width |
Return value for image width. |
|
height |
Return value for image height. |
double zoom_fit_scale (guint dest_width,guint dest_height,guint src_width,guint src_height,gboolean upscale_smaller);
Similar to zoom_fit_size(), but returns the zoom factor of the final image
with respect to the original image's size.