You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
jellyfin/MediaBrowser.Controller/Drawing/ImageStream.cs

43 lines
903 B

#pragma warning disable CA1711, CS1591
using System;
6 years ago
using System.IO;
using MediaBrowser.Model.Drawing;
6 years ago
namespace MediaBrowser.Controller.Drawing
{
public class ImageStream : IDisposable
{
public ImageStream(Stream stream)
{
Stream = stream;
}
6 years ago
/// <summary>
/// Gets the stream.
6 years ago
/// </summary>
/// <value>The stream.</value>
public Stream Stream { get; }
6 years ago
/// <summary>
/// Gets or sets the format.
/// </summary>
/// <value>The format.</value>
public ImageFormat Format { get; set; }
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
{
if (disposing)
6 years ago
{
Stream?.Dispose();
6 years ago
}
}
}
}