1. A method of compressing an input image, using at least one processor, the method comprising: verifying, using the at least one processor, a desired compression quality value corresponding to an image compression protocol for compressing the input image, the input image being a still image frame; calculating, using the at least one processor, a target peak signal-to-noise ratio (PSNR) value corresponding to the desired compression quality value; determining, using the at least one processor, an optimal image quality value corresponding to the target PSNR value from an image quality range corresponding to the image compression protocol based on the desired compression quality value and a desired file size, a maximum value of the image quality range being set as the desired compression quality value, and a minimum value of the image quality range being set based on an average value determined using a plurality of optimal image quality values associated with a plurality of other images; and outputting, using the at least one processor, an image file encoded at the determined optimal image quality value as a compressed file of the input image.