< Summary - Jellyfin

Information
Class: MediaBrowser.Controller.Drawing.ImageHelper
Assembly: MediaBrowser.Controller
File(s): /srv/git/jellyfin/MediaBrowser.Controller/Drawing/ImageHelper.cs
Line coverage
100%
Covered lines: 3
Uncovered lines: 0
Coverable lines: 3
Total lines: 19
Line coverage: 100%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 5/6/2026 - 12:15:23 AM Line coverage: 0% (0/3) Total lines: 178/11/2026 - 12:17:00 AM Line coverage: 100% (3/3) Total lines: 19

Coverage delta

Coverage delta 100 -100

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
GetNewImageSize(...)100%11100%

File(s)

/srv/git/jellyfin/MediaBrowser.Controller/Drawing/ImageHelper.cs

#LineLine coverage
 1#pragma warning disable CS1591
 2
 3using MediaBrowser.Model.Drawing;
 4
 5namespace MediaBrowser.Controller.Drawing
 6{
 7    public static class ImageHelper
 8    {
 9        public static ImageDimensions GetNewImageSize(ImageProcessingOptions options, ImageDimensions originalImageSize)
 10        {
 11            // Determine the output size based on incoming parameters
 512            var newSize = DrawingUtils.Resize(originalImageSize, options.Width ?? 0, options.Height ?? 0, options.MaxWid
 513            newSize = DrawingUtils.ResizeFill(newSize, options.FillWidth, options.FillHeight);
 14
 15            // Never encode larger than the source.
 516            return DrawingUtils.ScaleDownToFit(newSize, originalImageSize);
 17        }
 18    }
 19}