Neodynamic ImageDraw (2.0 or later) for ASP.NET
Microsoft .NET Framework (2.0 or later)
Microsoft Visual Studio .NET (2005 or later - Visual Web Developer Express Edition)
Microsoft Visual Studio 2005 ReportViewer control for ASP.NET
Microsoft SQL Server 2000 or later
You can use RDLC (Report Definition Language Client-side processing) reports to deliver images, photos or pictures stored in SQL BLOB (Binary Large Object) fields using the standard Image control. However those images are rendered as is (i.e. as they are stored in those BLOB records) and with a new size if desired as well.
Due to its flexible design, ImageDraw allows you to dynamically apply imaging effects on those SQL BLOB images in RDLC reports highly improving the whole appearance of them!
In the following sample we're going to create a RDLC report which shows Music Albums data including CD Cover images stored in SQL BLOB fields using ImageDraw and Visual Studio 2005 ReportViewer controls in an ASP.NET Web Application
The idea is enhance the appearance of the images onto the reports using ImageDraw Object Model.
In this sample we're going to use our NeoMIX database sample, a SQL Server database that you can get at the end of this guide.
Follow these steps
Public Function GetAlbumThumbnail(ByVal cover As Byte()) As Byte()
objImgElem.Source = Neodynamic.WebControls.ImageDraw.ImageSource.Binary
objImgElem.SourceBinary = cover
objScale.HeightPercentage = 50
objScale.WidthPercentage = 50
objDecBorder.Width = 3
objDecBorder.Fill.BackgroundColor = System.Drawing.Color.LightSteelBlue
objGlassTable.ReflectionPercentage = 25
objGlassTable.ReflectionOpacity = 50
If (objImgElem.Actions.Count = 0) Then
objImgElem.Actions.Add(objScale)
objImgElem.Actions.Add(objDecBorder)
objImgElem.Actions.Add(objGlassTable)
End If
If (objImageDraw.Elements.Count = 0) Then
objImageDraw.Elements.Add(objImgElem)
End If
Return objImageDraw.GetOutputImageBinary()
End Function
Me.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("Neodynamic.WebControls.ImageDraw, Version=2.0.2000.0, Culture=neutral, PublicKeyToken=49ea6b0547247dc5")
Me.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
Me.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
this.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("Neodynamic.WebControls.ImageDraw, Version=2.0.2000.0, Culture=neutral, PublicKeyToken=49ea6b0547247dc5");
this.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
this.ReportViewer1.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");
Sample Files Download
Here are the VB.NET and C# versions of this sample. Please, download the zip file you want to. After extract it you'll find all necessary files to reproduce this step by step guide.
Remember to download and install ImageDraw in order to reproduce this sample demo.
We provide best-in-class customer service and support directly from members of our dev team! If we are available when you contact us, you will get a response in few minutes; otherwise the maximum turnaround is 24hs in most cases.