From c59f2c937ac7cda0a64b5be084f9a551f56599a5 Mon Sep 17 00:00:00 2001 From: Stefan Date: Tue, 18 Feb 2020 10:10:59 +0100 Subject: [PATCH] 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; }