Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i am working on "Image Processing" Project.in which user can Store a multiple images and retrieve From Data Base.But Problem is Takes To Much Time To retrieve Image Data(Byte) from Data Base and displays in Stack Panel Image.

What I have tried:

i am retrieve the Image according to User Name.
Posted
Updated 18-Sep-17 21:07pm

We can't help you: we have no idea how you are retrieving the images, how many of them you are retrieving, what you are storing them as, how big they are, what else is going on at the same time. We don't even know what you consider "To Much Time" is in the real world, or if the SQL server and the app PC are the same computer, or connected via two tin cans and a bit of string!

But ... images are big, and can be very, very big: storing them in a DB can be a very bad idea as it uses a lot of memory and bandwidth to transfer them. And your use of a stackpanel implies that there is more than one image being retrieved. So start by looking at what you are doing, and how many processes you are using on the image data. Try to work out where the bottleneck is, and identify any areas which are good for time savings. Consider using the Stopwatch class to give you accurate baseline numbers to work from in establishing what is quick and what is slow.

Sorry, but we can't do any of that for you - we can't see your screen, access your HDD, or read your mind; let alone time your code while it is running!
 
Share this answer
 
Comments
ketan Ram Patil 19-Sep-17 4:11am    
1.I am storing and Retrieving images in Byte Format.
2.I am storing images Max size 2 MB and store in Data Base in Byte Format legth is 102288.
3.i am retrieving images Min 20 and Max 60.
4. i am scan image with 96 DPI and store in Data Base in Byte Format. one by one scan image and retrieve all scan images once and add images to the stack panel children.(convert Data Base image Byte data to Bitmap Image.)
OriginalGriff 19-Sep-17 4:26am    
So, you are fetching up to 60 images at 2MB - 120MB of raw data, depending on the file format how big that is as a display image which is always x size * y size * 4 bytes each.

And what part of this is slow? What have you found out by timing?
A common technique is storing just the file paths in the database and leave the actual files on the filesystem.
Moreover, depending on your processing algorithm requirements, you could transform the files (e.g. resize, or reduce the color depth) in order to make them more lightweight.
 
Share this answer
 
Comments
ketan Ram Patil 19-Sep-17 4:18am    
i want to store the each scan image in data base and retrieve all scan images. :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900