I have a jpeg image of 400x400 px that i want to paste into a 960x640 image. Is there a command line image processor that I can use on OSX? Thanks!
There are command-line tools like ImageMagick, but you might find OSX's Automator to be easier to use.
Since you're on OS X, you can look into SIPS (scriptable image processing system) since it is installed by default. I'm not sure I fully understand what you're doing, but from your comments it looks like you're just trying to resize the image. If that's the case, have a look at the --resampleHeightWidth
, --padToHeightWidth
, and --cropToHeightWidth
options on the man page linked above.
For example, you might try sips -z 960 640 yourinputimage.jpeg
EDIT: Based on your comment -- no, you cannot do this with SIPS to my knowledge. As others have mentioned, your best bet is probably ImageMagick. Once installed, you can use the composite
command-line tool to do what you're asking. See this documentation.
If you want it on iPhone, then I'll suggest you to search or even build Image Magick for the iPhone.
It will allow you to resize images right from the command line.