reencodeImage

Used to re-econodes an image to a specified image format - creates a copy of the file at the same location as fileName. - the file would have the format preferred_format if possible, otherwise the default format is jpeg. - the function makes sure that all non-essential image contents are disposed.
Parameters Summary
string $fileName
int $preferred_format = 0