ContainerList_GetImage.cs 845 B

12345678910111213141516171819202122232425262728
  1. using System.Linq;
  2. using System.IO;
  3. using System.Drawing;
  4. namespace System.Fire.Container {
  5. public partial class ContainerList {
  6. /// <summary>
  7. /// Get an image object that was stored in the container
  8. /// </summary>
  9. /// <param name="FileIndex">The container file index</param>
  10. /// <returns>Returns the image object</returns>
  11. public Image GetImage(int FileIndex) {
  12. return this.GetImage(this._files[FileIndex]);
  13. }
  14. /// <summary>
  15. /// Get an image object that was stored in the container
  16. /// </summary>
  17. /// <param name="File">The container file index</param>
  18. /// <returns>Returns the image object</returns>
  19. public Image GetImage(ContainerFile File) {
  20. return Image.FromStream(GetStream(File));
  21. }
  22. }
  23. }