473,327 Members | 2,103 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Reading Images from Server-Side

Hi,

I was trying to request for an image from server-side app, but I do not understand how do I make the two ends meet.

The server returns a byte array (image is stores in DB), with content type image/png, but how do i build back the image and create an img tag in JS?

Any guidance would do.

Thanks,
May 17 '07 #1
4 1678
acoder
16,027 Expert Mod 8TB
Why not create the image on the server-side and then access the newly created image using javascript.
May 17 '07 #2
Why not create the image on the server-side and then access the newly created image using javascript.
I dont want to physically white that file and then reference it... Cause the DB would be queried a lot in a small time interval, so I want to avoid writting multiple file. Isnt there a while to read it as a byte array or something?
May 17 '07 #3
pbmods
5,821 Expert 4TB
Look at it this way:

You know how you point your browser to http:// somesite.com/thepage.php, but you get HTML code instead of PHP in your browser?

It works the same way with images. Just use the URI of your PHP script as the source attribute for the image.
May 17 '07 #4
Look at it this way:

You know how you point your browser to http:// somesite.com/thepage.php, but you get HTML code instead of PHP in your browser?

It works the same way with images. Just use the URI of your PHP script as the source attribute for the image.
Yeah I think i'll do that.. Thanks a lot man!
May 17 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Will McGugan | last post by:
Hi, I'm writing an app that downloads images. It rejects images that are under a certain size - whithout downloading them completely. I've implemented this using PIL, by downloading the first K...
4
by: Luca | last post by:
Hello Everybody, I'm a 26 years old Italian "Florentine" Computer technician :) I'm writing you about an idea that I've got of a function that could be introduced in new web browsers (or even...
0
by: Lata Neti | last post by:
I am trying to retrieve images from SQL server and display them on the client’s browser. Images in the SQL server are imported from MS Access 2002 I found the following code that mentions about...
4
by: Mark Allison | last post by:
Hi, Newbie here, please bear with me. I have a C# project which implements a tree view control. I want to add some images to this tree view control. The tree view control represents the tree...
10
by: Neo Geshel | last post by:
I am seeking to hand-roll my own blog in ASP.NET 2.0 and SQLExpress 2005. Why? Because I can. Because I will gain experience. The one thing that has me stumped at square one is inline images....
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
12
by: John Kotuby | last post by:
Hi all, Maybe this is a simple problem found in ASP.NET 2.0 course 101, but I must have missed it. When I create a page in Visual Web Developer and use URLs like "/images/picture.gif " or a link...
76
by: rcoco | last post by:
Hi all, I'm facing this problem I have images on my website but when I Deploye the website on server the Images are not there I only get the X sign. How can I go about this. Thanks
3
by: 95redtegls | last post by:
Ok here is my question Can javascript read the contents of a folder and list its path name in a array Here is what i have so far @echo off if '%1'=='w' ( echo Scenary='images/Scenary/%2';...
1
by: Hamayun Khan | last post by:
Hi All I have text files having queries like below. INSERT INTO tblJobScrap (,,,,,,,,,) VALUES...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.