Resamle image from commandline in osx

sips --resampleWidth yourdesiredwidth image.name