< Summary - Jellyfin

Information
Class: MediaBrowser.Controller.Drawing.ImageHelper
Assembly: MediaBrowser.Controller
File(s): /srv/git/jellyfin/MediaBrowser.Controller/Drawing/ImageHelper.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 17
Line coverage: 0%
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

Metrics

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

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
 012            var newSize = DrawingUtils.Resize(originalImageSize, options.Width ?? 0, options.Height ?? 0, options.MaxWid
 013            newSize = DrawingUtils.ResizeFill(newSize, options.FillWidth, options.FillHeight);
 014            return newSize;
 15        }
 16    }
 17}