resize image to a specific resolution/pixel

convert -resize 1024X768 source.png dest.jpg #(keep aspect ratio)

convert -resize 1024X768! source.png dest.jpg #(not keep aspect ratio)

https://askubuntu.com/questions/1164/how-to-easily-resize-images-via-command-line

just a side note on how to resize image in scipy for cnn.

my_image = “image.jpg” # change this to the name of your image file
fname = “images/” + my_image
image = np.array(ndimage.imread(fname, flatten=False))
my_image = scipy.misc.imresize(image, size=(300,225)).reshape((3002253,1))
my_image = my_image/255.