forked from edgardoh/darktable
-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is based on those 2 rules: - Resizing by scaling factor or by max size are independent and select one will cover the other value, because user cannot see both in UI. - We don't do upscaling when exporting. So the actual logic on determine final size is simple: 1. If user set value <= 0, this means don't resize and use the original image size. 2. If user set value > original image size, this also means don't resize and use the original image size. 3. For max size, if user does not set the value according to image ratio, we will recalculate the value to keep image ratio and make sure the calculated size is smaller than user's max size. 4. If by scaling factor, calculate max size according to scaling factor. If by max size, calculate scaling factor according to max size. 5. Limit size by max size, and pass correct size and scaling factor to pixelpipe. Fixes <#362>.
- Loading branch information
Showing
1 changed file
with
50 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters