I guess I outsmarted myself. this already uses GD to determine image size.