Esempio n. 1
0
 public byte[] ExtractImage(int index, out ushort type)
 {
     if (DrawingGroup != null)
     {
         MsofbtDggContainer dggContainer   = DrawingGroup.EscherRecords[0] as MsofbtDggContainer;
         MsofbtBSE          blipStoreEntry = dggContainer.BstoreContainer.EscherRecords[index] as MsofbtBSE;
         if (blipStoreEntry.BlipRecord != null)
         {
             type = blipStoreEntry.BlipRecord.Type;
             return(blipStoreEntry.ImageData);
         }
     }
     type = 0;
     return(null);
 }
Esempio n. 2
0
        public List <byte[]> ExtractImages()
        {
            List <byte[]> Images = new List <byte[]>();

            if (DrawingGroup != null)
            {
                MsofbtDggContainer dggContainer = DrawingGroup.EscherRecords[0] as MsofbtDggContainer;
                foreach (MsofbtBSE blipStoreEntry in dggContainer.BstoreContainer.EscherRecords)
                {
                    if (blipStoreEntry.BlipRecord == null)
                    {
                        continue;
                    }
                    Images.Add(blipStoreEntry.ImageData);
                }
            }
            return(Images);
        }