If you want to retain aspect ratio you can do -
./ffmpeg -i 1.jpg -vf scale="360:-1" 2.jpg
or if you want to resize based on input width and height, let's say half of input width and height you can do -
./ffmpeg -i 1.jpg -vf scale="iw/1:ih/2" 2.jpg
where
iw: input width
ih: input height