• New function parameter, quality.
• New function parameter, force image type.
• Only makes resize if necessary.
• Fix the proportionality calculation
• Fix gd-jpeg, libjpeg: recoverable error