type size = | Scale of float| Pixel of int| Guess
type aspect_opts = | Keep_at_most| Keep_at_least| Dont_keep
type resize_switch = | Always| Bigger_only| Smaller_only
type from = | TopLeft| BottomRight| Center
type position = | AtPixel of from * int| AtScale of from * float
type t = {geom_width : int;geom_height : int;geom_x : int;geom_y : int;
}val compute : spec -> int -> int -> t