Hi Everyone,
I have one web application where I need to display some images from database. In database those images are stored in byte format. Currently, I have implemented a method to convert byte array into physical file then using that physical path I am displaying images.
I do not want to create physical file. Without creating any temp file I want to display image.
When retrieving data from database then its not the same format as it was in database.
Database Format:
“\377\330\377\340\000\020JFIF\000\001\001\001\000\000
\000\000\377\341\000\366Exif\000\000MM\000*\000\000\000\010\000\010\001\032\000\005\000\000\000\001\000\000\000n\001\033\000\005\000\000\000\001\000\000\000v\001(\000\003\000\000\000\001\000\002\000\000 (…)”
Servoy Format:
[-1,-40,-1,-32,0,16,74,70,73,70,0,1,1,1,0,100,0,100,0,0,-1,-37,0,67,0,3,2,2,3,2,2,3,3,3,3,4,3,3,4,5,8,5,5,4,4,5,10,7,7,6,8,12,10,12,12,11,10,11,11,13,14,18,16,13,14,17,14,11,11,16,22,16,17,19,20,21,21,
21,12,15,23,24,22,20,24,18,20,21,20,-1,-37,0,67,1,3,4,4,5,4,5]
I am trying to get actual (raw) data from database which is in binary format then I will convert it into base64 format. Then I can use it directly to display the image without creating physical file.
Anyone has an idea to get RAW data from database. Because if I get the RAW data then I will convert it into base64 string and directly I will pass this string to src tag to display the images.
Thanks in advance!