Is there any way to load an HTML image from memory instead of a physical file?
I am developing a mobile app using html/css/js; this app needs to capture images using phone's camera and perform some actions on the images.
Since I am using js, which by definition and design does not and can not have I/O functions, I keep the images in memory. However, when I try to display the pictures, using <IMG SRC='...'> it seems that the only way for HTML to load an image is from a physical, disk-based file. Since the trivial solution (to create a "RAM disk" and put these "files" there) is not accessible from html/css/js platform, I wonder if someone else have had this problem before.
Any help will be greatly appreciated, thanks in advance.
Hmm, I know you can use base64 strings as an image source, I'm not sure if this can help you, but if you looked into this it might help. Good Luck.
Thanks for your response, I have already tried that and it does not work. It's odd, because it should.
Not knowing more about what you're developing (an app I'd imagine), is there no way on the starting end (i.e. where you first put the image into the memory), to first convert it to a base64 string, and then store the string in the memory? Or is this what you said you have already tried? It seems as if it's just reading the string from the memory and not trying to call the actual data with that method, that it should work.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread