public override ImageData Read(IBinaryStream stream, ImageMetaData info) { var meta = (SplMetaData)info; var reader = new SplReader(stream.AsStream, meta); reader.Unpack(); return(ImageData.Create(info, PixelFormats.Bgr24, null, reader.Data)); }
public override ImageData Read(Stream stream, ImageMetaData info) { var meta = info as SplMetaData; if (null == meta) { throw new System.ArgumentException("SplFormat.Read should be supplied with SplMetaData", "info"); } var reader = new SplReader(stream, meta); reader.Unpack(); return(ImageData.Create(info, PixelFormats.Bgr24, null, reader.Data)); }