[PR #520] [MERGED] Fix potential bug where aspect ratio would be incorrectly calculated #8366

Closed
opened 2026-02-07 05:42:48 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/jellyfin/jellyfin/pull/520
Author: @hawken93
Created: 1/9/2019
Status: Merged
Merged: 1/16/2019
Merged by: @joshuaboniface

Base: devHead: fix_aspect


📝 Commits (1)

  • c75d03c Fix potential problem where aspect ratio would be incorrectly calculated

📊 Changes

1 file changed (+1 additions, -2 deletions)

View changed files

📝 MediaBrowser.Controller/Entities/Photo.cs (+1 -2)

📄 Description

Just came across this function. If the image is flipped it would swap the width and height variables but still divide by the original height. For a flipped image this would lead to return height / height so this fixes that. I think it will save us some hunting in the future. But to be honest, I would like to evaluate if we need this aspect ratio magic. I would assume that the frontend would handle aspect ratios


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/jellyfin/jellyfin/pull/520 **Author:** [@hawken93](https://github.com/hawken93) **Created:** 1/9/2019 **Status:** ✅ Merged **Merged:** 1/16/2019 **Merged by:** [@joshuaboniface](https://github.com/joshuaboniface) **Base:** `dev` ← **Head:** `fix_aspect` --- ### 📝 Commits (1) - [`c75d03c`](https://github.com/jellyfin/jellyfin/commit/c75d03c2170e8dfc70c72eb2fb8afeeb8aae08f5) Fix potential problem where aspect ratio would be incorrectly calculated ### 📊 Changes **1 file changed** (+1 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `MediaBrowser.Controller/Entities/Photo.cs` (+1 -2) </details> ### 📄 Description Just came across this function. If the image is flipped it would swap the width and height variables but still divide by the original height. For a flipped image this would lead to `return height / height` so this fixes that. I think it will save us some hunting in the future. But to be honest, I would like to evaluate if we need this aspect ratio magic. I would assume that the frontend would handle aspect ratios --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-07 05:42:48 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/jellyfin#8366