On an Apple OS X system, you can reduce the size of an image by using the sips command with the
-Z sizeparameter where size is the maximum value you want for either height or width. E.g., suppose I have a PNG file named
system_preferences.png", which is 1,560 pixels wide by 1,604 high. The image height is greater than the image width and I want the maximum dimension to be 780 pixels. By opening a Teminal window - the Terminal utility is found in the Applications/Utilities directory - I can get a command line interface (CLI), aka a "shell prompt", that will allow me to enter the command
sips -Z 780 system_preferences.png. The command will ensure that neither dimension will be greater than 780 pixels. In this case the height will be set to 780 pixels and the width will be adjusted to maintain the current aspect ratio, so the new dimensions will be 758 pixels wide and 780 pixels high.
[ More Info ]