summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--macosx/Controller.mm15
1 files changed, 13 insertions, 2 deletions
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 769f4039a..d8ce1bfd9 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -3422,8 +3422,19 @@ if (item == nil)
}
else // /* If not 0 or 2 we assume objectForKey:@"UsesPictureSettings is 1 which is "Use picture sizing from when the preset was set" */
{
- job->width = [[chosenPreset objectForKey:@"PictureWidth"] intValue];
- job->height = [[chosenPreset objectForKey:@"PictureHeight"] intValue];
+ /* we check to make sure the presets width/height does not exceed the sources width/height */
+ if (fTitle->width < [[chosenPreset objectForKey:@"PictureWidth"] intValue] || fTitle->height < [[chosenPreset objectForKey:@"PictureHeight"] intValue])
+ {
+ /* if so, then we use the sources height and width to avoid scaling up */
+ job->width = fTitle->width;
+ job->height = fTitle->height;
+ }
+ else // source width/height is >= the preset height/width
+ {
+ /* we can go ahead and use the presets values for height and width */
+ job->width = [[chosenPreset objectForKey:@"PictureWidth"] intValue];
+ job->height = [[chosenPreset objectForKey:@"PictureHeight"] intValue];
+ }
job->keep_ratio = [[chosenPreset objectForKey:@"PictureKeepRatio"] intValue];
if (job->keep_ratio == 1)
{