public Dimension getImageDimension(){InternalWorkbook iwb = getPatriarch().getSheet().getWorkbook().getWorkbook();EscherBSERecord bse = iwb.getBSERecord(getPictureIndex());byte[] data = bse.getBlipRecord().getPicturedata();int type = bse.getBlipTypeWin32();return ImageUtils.getImageDimension(new ByteArrayInputStream(data), type);}
public Size GetImageDimension(){InternalWorkbook iwb = (_patriarch.Sheet.Workbook as HSSFWorkbook).Workbook;EscherBSERecord bse = iwb.GetBSERecord(PictureIndex);byte[] data = bse.BlipRecord.PictureData;using (MemoryStream ms = new MemoryStream(data)){using (Image img = Image.FromStream(ms)){return img.Size;}}}