ImageStream.cs 645 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.IO;
  3. using MediaBrowser.Model.Drawing;
  4. namespace MediaBrowser.Controller.Drawing
  5. {
  6. public class ImageStream : IDisposable
  7. {
  8. /// <summary>
  9. /// Gets or sets the stream.
  10. /// </summary>
  11. /// <value>The stream.</value>
  12. public Stream Stream { get; set; }
  13. /// <summary>
  14. /// Gets or sets the format.
  15. /// </summary>
  16. /// <value>The format.</value>
  17. public ImageFormat Format { get; set; }
  18. public void Dispose()
  19. {
  20. if (Stream != null)
  21. {
  22. Stream.Dispose();
  23. }
  24. }
  25. }
  26. }