Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Monday, July 19, 2010 6:59:10 AM(UTC)

Sunn  
Sunn

Groups: Registered
Posts: 2


I've been using LEADTools for a several months to process and manipulate images in disk files in my in-house application. It's a store inventory program written in C# and everything is great. But now I need to modify my app to store images in a database.

I'm using SQL Server 2008 R2 and I'm thinking of using blob field such as FILESTREAM. I'm going to do my own research but wanted any useful hints about the LEAD TOOLS side when saving the images before I store them into the database.

Thanks,

Sunn
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, July 22, 2010 6:06:25 PM(UTC)

Walter  
Walter

Groups: Tech Support
Posts: 367

Thanks: 1 times
Was thanked: 4 time(s) in 4 post(s)

As a general hint, always use compression when saving images, especially if you're going to store them inside the database table itself. Our toolkit provides plenty of compression options. Some are more suited to black and white images, such as JBIG2 and LEAD ABC, while others are better for color images like JPEG2000.

From the perspective of using LEADTOOLS .NET classes, there won't be much difference between saving to disk and saving to database. Our RasterCodecs.Save() functions have overloads that take string file name and other overloads that take standard .NET Stream objects.

For example, if your current code uses this overload:
Save(RasterImage image, string fileName, RasterImageFormat format, int bitsPerPixel)
You can simply use the following overload to save to stream, then store the stream into the database like you do with any binary data:
Save(RasterImage image, Stream stream, RasterImageFormat format, int bitsPerPixel)

Walter Bates
Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.055 seconds.