PdfRpt.ColumnsItemsTemplates.ByteArrayImageField.getImage C# (CSharp) Method

getImage() private method

private getImage ( PdfRpt.Core.Contracts.CellAttributes attributes ) : Image
attributes PdfRpt.Core.Contracts.CellAttributes
return Image
        private Image getImage(CellAttributes attributes)
        {
            var data = attributes.RowData.Value;
            if (data != null)
            {
                return ((byte[])data).GetITextSharpImageFromByteArray(_cacheImages);
            }

            if (!string.IsNullOrEmpty(_defaultImageFilePath) && File.Exists(_defaultImageFilePath))
            {
                return _defaultImageFilePath.GetITextSharpImageFromImageFile(this._cacheImages);
            }
            throw new InvalidDataException("Current image data is null & defaultImageFilePath was not found.");
        }