KognitionAI / pilecv4j

Image and Video Manipulation and Processing
Apache License 2.0
7 stars 7 forks source link

Enable Image Upscaling #9

Closed omerodeh closed 4 years ago

omerodeh commented 4 years ago

Changed preserveAspectRatio(final Size originalMatSize, final Size newSize) to return a scaled up size if originalMatSize is smaller than newSize.

Added javadoc for preserveAspectRatio

Old behavior: preserveAspectRatio returns originalMatSize if original height and width are both less than newSize. New behavior: preserveAspectRatio returns a scaled up size, matching at least one of the height or width in newSize (whichever requires less scaling)