public static System.Drawing.Image RedimensionarSeMaior(this System.Drawing.Image image, int NewWidthMax, int NewHeightMax) { if (image.Width <= NewWidthMax && image.Height <= NewHeightMax) { return(image); } return(image.Redimensionar(NewWidthMax, NewHeightMax)); }