// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageProcessorCore.Formats { using System.IO; /// /// Encapsulates properties and methods required for decoding an image from a stream. /// public interface IImageDecoder { /// /// Gets the size of the header for this image type. /// /// The size of the header. int HeaderSize { get; } /// /// Returns a value indicating whether the supports the specified /// file header. /// /// The containing the file extension. /// /// True if the decoder supports the file extension; otherwise, false. /// bool IsSupportedFileExtension(string extension); /// /// Returns a value indicating whether the supports the specified /// file header. /// /// The containing the file header. /// /// True if the decoder supports the file header; otherwise, false. /// bool IsSupportedFileFormat(byte[] header); /// /// Decodes the image from the specified stream to the . /// /// The to decode to. /// The containing image data. void Decode(Image image, Stream stream); } }