Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Logo] Ignore stretching. Embrace borders. #10

Open
Spikestuff opened this issue Dec 24, 2020 · 0 comments
Open

[Logo] Ignore stretching. Embrace borders. #10

Spikestuff opened this issue Dec 24, 2020 · 0 comments

Comments

@Spikestuff
Copy link

At line 211 there's stuff for resizing stuff.
Could implement for Handheld games specifically a script to add borders to deal with it.

logoVideo = ImageSource(file=file, start=0, end=int((resized.FrameRate * 2) - 1), fps=resized.FrameRate) \
    .ConvertToRGB32().AssumeFPS(resized)
logoAudio = BlankClip(logoVideo, audio_rate=resized.AudioRate, channels=resized.AudioChannels)

logoVideo = logoVideo.Lanczos4Resize(logoVideo.Width * resized.Height / logoVideo.Height, resized.Height)
BorderSize = (logoVideo.Width < resized.Width) ? Int((resized.Width - logoVideo.Width) / 2) : 0
logoVideo = (BorderSize > 0) ? logoVideo.AddBorders(BorderSize, 0, BorderSize, 0, $000000) : logoVideo

logo = AudioDub(logoVideo, logoAudio).Lanczos4Resize(resized.width, resized.height)
last = hdvb ? logo.PointResize(resized.width / 2, resized.height) : logo ++ resized

And it's probably better to use the color bit to account for people that have white logos instead of black, so maybe chuck something up going logocolor = $000000 or something.


Before (using GBA's 240x160 resolution):
gbastretch

After (red for emphasis):
gbastretchborder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant