I'm using the Xzing lib to capture barcode images, and I'm wondering where do those images get stored if there is no pre-defined or optional destination selection option?
Is the captured image just temporarily stored in the applications isolated storage untill the application terminates/ is in a closed state or what?
Based on a quick look at the code, it appears that image are only held in memory and it is up to you to save to IsolatedStorage if you wish to persist them that way.
Related
I'm currently working on a ML project with the HoloLens 1 and aiming to process a video taken by the front camera. Therefore I need to access the camera data from my c# Unity project. I assume there must be a way to store this in some data type(Tensor/Array/...).
I found several ways to store videos or pictures directly to the disc but none for directly using the data in my program. There might be a possibility to firstly save the video to the disc and afterwards access the saved data from my program, but that seems quite computing-intensive.
Do you have any suggestions how to make the data of the images available in the program?
You can definitely save the picture frame to memory, you can start with PhotoCapture class to capture the picture and stored as a variable. Please refer to this link to learn more about how to use it: UnityEngine.Windows.WebCam.PhotoCapture.
And the key point is when you call the async method TakePhotoAsync(onCapturedPhotoToMemoryCallback), you need to pass in a function as a parameter, it will be invoked once the photo has been stored to memory. And in this function, you will get an PhotoCaputrerFrame instance as a parameter that contains the image captured from the camera.
This question already has answers here:
Storing Images in DB - Yea or Nay?
(56 answers)
Closed 6 years ago.
I want to save the profile picture, and I want to know what is the best option.
-Saving the path in the DB and load the image according to his location.
-Save the whole image.
I'm using EntityFrameWork and SQL server Database
It depends on your application needs, Look at the answers in this post Storing Images in DB - Yea or Nay?
Storing images into database has some pros and cons
Images stored in the database do not require a different backup strategy. Images stored on filesystem do
It is easier to control access to the images if they are in a database. Idle admins can access any folder on disk. It takes a really determined admin to go snooping in a database to extract the images
On the other hand there are problems associated
Require additional code to extract and stream the images
Latency may be slower than direct file access
Heavier load on the database server
I suggest to save the image somewhere on file system and store path of that in database.
Advantages:
Images will be static files and can be served directly by Web Server and also can be cached easily.
DB server will not be overloaded with lot of request to fetch image data.
No need of dynamic code to serve files.
File system storage is less expensive then DB storage.
All over the web, most of the images are stored in filesystem.
The application is written in C#. It uses nHibernate and SQLite and runs on Windows. I should store pictures and bind them to a user.
So far, I don't really know what is the best way to store the pictures. If I decide to store the path of the picture and save the image in a directory, I'll have problems as soon as the directory or the file is renamed or moved. In the other hand, storing image as BLOB in SQLite is slow as I have to "cast" the image into a bytes array before storing and when I retrieve, I have to set the bytes array into an image.
What is the recommended way for this?
I wrote an image user type for this purpose. With it, you just pass the Image object, not its bytes: http://weblogs.asp.net/ricardoperes/archive/2009/09/17/nhibernate-image-user-type.aspx.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Storing Images in DB - Yea or Nay?
Pretty straight forward, I am hosting a site where users can upload pictures, and I have a .net File upload control working appropriately.. I'm just wondering what methodology I should use to store them on the server..
I can use the SaveAs() method off the FileUpload control which saves it as an actual file..
I can break the image down to a Byte[] and store it in the database for access.
I believe the real question here is.. Do I want the load on IIS or Sql Server 2008 R2?
What's the general consensus on which methodology I should use and why? Thanks!
There is no general consensus, because neither method is ideal.
Storing the images as files means that it becomes harder to scale the application to run on multiple servers. Then you would need a SAN/NAS to store the files instead of a local disk.
Storing the images in the database means that you are using a lot of the cache space for image data, slowing down other queries, and it also increases the size of the database, and the backups. It also means that you have to serve the images through a page, you can't just request the file directly.
So, it comes down to how much images you will have, and how scalable you need the application to be.
Avoid getting them in the database. That will make your DB a lot larger in size just because of a few files. That also affects the backup size.
I do not see any real gain on having the actual file bytes in the database. If you have the physical path to the file in the file system, that would suffice.
That also allows you to have your own backup strategy for the files.
I am trying to figure out a way to programatically set an image on a Visual Studio Report where the image doesn't come from a file or from the database but from the running application.
My best guess is to somehow subvert the Embedded or Database Source types but I have been unable to figure out how to do this.
Do I really want to do this? Yes. The images are not in the database and can't be access via the file system for security reasons. I plan to Render the report directly to a PDF file stream to hopefully keep the memory footprint down.
Here is a revised solution:
You can save the image temporarily in the database after the user selects it from your app... in a table used for just that, clear out the table periodically, if you never really want to save this image. Then display in the report by passing the imageID for the table; based on what you said above it sounds like you know how to display an image saved in your database but if not I can give you a tutorial link.