Using the convert utility from the ImageMagick suite:
convert <in-filename> -resize 25% <out-filename>