func ResizeMax(maxWidth, maxHeight uint, src image.Image, scale draw.Scaler) image.Image {
    srcWidth := uint(src.Bounds().Dx())
    srcHeight := uint(src.Bounds().Dy())
    if srcWidth <= maxWidth && srcHeight <= maxHeight {
        return src