From c59f2c937ac7cda0a64b5be084f9a551f56599a5 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 10:10:59 +0100 Subject: [PATCH 1/2] Adding PillarBox as own EAspect (fix #499) Prior this change PillarBox was made in a special case at LetterBox, but that has an effect on the cover image creation. Fix #499 --- VocaluxeLib/CHelper.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/VocaluxeLib/CHelper.cs b/VocaluxeLib/CHelper.cs index fa5fb2f4..35a6ae5c 100644 --- a/VocaluxeLib/CHelper.cs +++ b/VocaluxeLib/CHelper.cs @@ -139,12 +139,7 @@ namespace VocaluxeLib } break; case EAspect.LetterBox: - if (boundsAspectRatio == aspectRatio) // Pillarbox - { - scaledWidth = bounds.W * 0.77f; - scaledHeight = bounds.W / aspectRatio; - } - else if (boundsAspectRatio < aspectRatio) + if (boundsAspectRatio < aspectRatio) { scaledWidth = bounds.W; scaledHeight = bounds.W / aspectRatio; @@ -155,6 +150,10 @@ namespace VocaluxeLib scaledWidth = bounds.H * aspectRatio; } break; + case EAspect.PillarBox: + scaledWidth = bounds.W * 0.77f; + scaledHeight = bounds.W / aspectRatio; + break; default: return bounds; } From dc98e13da50a9abc2567609e901ce14c8b851dc8 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 10:12:08 +0100 Subject: [PATCH 2/2] Added PillarBox EAspect --- VocaluxeLib/Enums.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/VocaluxeLib/Enums.cs b/VocaluxeLib/Enums.cs index 84252cfa..02cb86a7 100644 --- a/VocaluxeLib/Enums.cs +++ b/VocaluxeLib/Enums.cs @@ -67,6 +67,7 @@ namespace VocaluxeLib Automatic, Crop, LetterBox, + PillarBox, Stretch, Zoom1, Zoom2