Exemple #1
0
        public override ImageData Read(IBinaryStream stream, ImageMetaData info)
        {
            var meta = (CbgMetaData)info as CbgMetaData;

            using (var reader = new CbgReader(stream.AsStream, meta))
            {
                reader.Unpack();
                return(ImageData.Create(meta, reader.Format, null, reader.Data, reader.Stride));
            }
        }
Exemple #2
0
        public override ImageData Read(Stream stream, ImageMetaData info)
        {
            var meta = info as CbgMetaData;

            if (null == meta)
            {
                throw new ArgumentException("CompressedBGFormat.Read should be supplied with CbgMetaData", "info");
            }
            using (var reader = new CbgReader(stream, meta))
            {
                reader.Unpack();
                return(ImageData.Create(meta, reader.Format, null, reader.Data, reader.Stride));
            }
        }
Exemple #3
0
 public override ImageData Read(Stream stream, ImageMetaData info)
 {
     var meta = info as CbgMetaData;
     if (null == meta)
         throw new ArgumentException ("CompressedBGFormat.Read should be supplied with CbgMetaData", "info");
     using (var reader = new CbgReader (stream, meta))
     {
         reader.Unpack();
         return ImageData.Create (meta, reader.Format, null, reader.Data, reader.Stride);
     }
 }