Hey all. I need to output an image via an .aspx page and hope someone
here can help.
I would like to display an image like this:
<img src="displayIma ge.aspx?categor yID=1">
The .aspx page will grab a random URL from the database based on the
category id.
I would like the script to load the URL and download the image, and
then have the output be of content type image/gif.
Is there a simple way to do this? I'm not sure if I can use the
XMLHTTP object due to firewall settings on our server, but I'm not 100%
sure on this.
thanks.
-RH 4 1576
This is one for google, as theres a ton of example already out there to help
you.
Two to get you started........ http://aspnet.4guysfromrolla.com/articles/012203-1.aspx http://www.codeproject.com/aspnet/ImageBinaryStream.asp
Between those two you should find everything you require to create your own
solution.
--
Regards
John Timney (MVP)
VISIT MY WEBSITE: http://www.johntimney.com
<rh******@gmail .comwrote in message
news:11******** *************@b 28g2000cwb.goog legroups.com...
Hey all. I need to output an image via an .aspx page and hope someone
here can help.
I would like to display an image like this:
<img src="displayIma ge.aspx?categor yID=1">
The .aspx page will grab a random URL from the database based on the
category id.
I would like the script to load the URL and download the image, and
then have the output be of content type image/gif.
Is there a simple way to do this? I'm not sure if I can use the
XMLHTTP object due to firewall settings on our server, but I'm not 100%
sure on this.
thanks.
-RH
Close except my database table will hold the external url of an image
that lives on other servers, so the data type will be a varchar, not
binary.
In your first link there's this:
-System.Drawing. Image.FromFile( Server.MapPath( imageUrl))
which loads the image from the server. i don't think this would work
for me.
thanks.
John Timney (MVP) wrote:
This is one for google, as theres a ton of example already out there to help
you.
Two to get you started........
http://aspnet.4guysfromrolla.com/articles/012203-1.aspx http://www.codeproject.com/aspnet/ImageBinaryStream.asp
Between those two you should find everything you require to create your own
solution.
--
Regards
John Timney (MVP)
VISIT MY WEBSITE: http://www.johntimney.com
Excuse my confusion, but I'm not sure what your problem actually is then, if
the image is simply a URL held in the database why cant you just bind it to
the image src?
--
Regards
John Timney (MVP)
VISIT MY WEBSITE: http://www.johntimney.com
<rh******@gmail .comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
Close except my database table will hold the external url of an image
that lives on other servers, so the data type will be a varchar, not
binary.
In your first link there's this:
-System.Drawing. Image.FromFile( Server.MapPath( imageUrl))
which loads the image from the server. i don't think this would work
for me.
thanks.
John Timney (MVP) wrote:
>This is one for google, as theres a ton of example already out there to help you.
Two to get you started........
http://aspnet.4guysfromrolla.com/articles/012203-1.aspx http://www.codeproject.com/aspnet/ImageBinaryStream.asp
Between those two you should find everything you require to create your own solution. -- Regards
John Timney (MVP) VISIT MY WEBSITE: http://www.johntimney.com
Understandable for the confusion.
What I'm doing is displaying a random ad (url and image) in an HTML
E-mail template. Unfortunately I cannot run a server script to query
the database and output the HTML block that easily. I believe
outputting an actual image would do the trick in this case.
John Timney (MVP) wrote:
Excuse my confusion, but I'm not sure what your problem actually is then, if
the image is simply a URL held in the database why cant you just bind it to
the image src?
--
Regards
John Timney (MVP)
VISIT MY WEBSITE: http://www.johntimney.com
<rh******@gmail .comwrote in message
news:11******** **************@ b28g2000cwb.goo glegroups.com.. .
Close except my database table will hold the external url of an image
that lives on other servers, so the data type will be a varchar, not
binary.
In your first link there's this:
-System.Drawing. Image.FromFile( Server.MapPath( imageUrl))
which loads the image from the server. i don't think this would work
for me.
thanks.
John Timney (MVP) wrote:
This is one for google, as theres a ton of example already out there to
help
you.
Two to get you started........
http://aspnet.4guysfromrolla.com/articles/012203-1.aspx http://www.codeproject.com/aspnet/ImageBinaryStream.asp
Between those two you should find everything you require to create your
own
solution.
--
Regards
John Timney (MVP)
VISIT MY WEBSITE: http://www.johntimney.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lawrence |
last post by:
Can someone please tell me where I can get some open source code for
resizing images? I know such code has been written a million times and
I don't feel like doing it again from scratch.
|
by: Tim Streater |
last post by:
I want to generate a web page using PHP, and in the middle generate a
graphic I read from another server. So the graphic is in $picture. So I
can either write $picture to a temp file and then use an ordinary <img
src=filename> to get the browser to display it, or output it by itself
in a new page, because then I have a chance to output the correct header
so I don't just get garbage on the screen.
Evidently first approach is poor because...
|
by: Richard |
last post by:
In an attempt to try out some things with php, I have run into a new snag.
The output file is pure text.
Basically it's a simple photo gallery using <ul> links to show various
thumbnails.
In turn, the thumbnails show a bigger image.
All on the same page.
My only possible thinking is that it has something to do with the array
notation.
$image =array ( );
$image="name.jpg";
|
by: QuasiChameleon |
last post by:
Hi,
I'm trying to create a grayscale image class that reads and writes
grayscale Targa format. This works well with smaller images, but
corrupts larger images and creates a "Segmentation fault (core dumped)"
error. I am at a loss as to why this works only part of the time.
I hope it's proper etiquette to post the code below (3 files).
Can someone please show me what's wrong with the following code? I
|
by: Phil |
last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and
made into a TIF file and placed on the client (could be in temp internet
dir). The reason we need it in TIF format is there are multiple pages per
invoice.
How can I grab the data, make the TIF, place it on the client and then Open
with the clients default program for veiwing TIF's (usually Microsoft Picture
and Fax Viewer).
Please help.
| |
by: Ivan Demkovitch |
last post by:
Hi!
I'm using output stream to output image to webpage.
//Move array to response stream.
Response.ContentType = "image/jpeg";
Response.OutputStream.Write(arrBt, 0, arrBt.Length);
Response.End();
|
by: jain_tj |
last post by:
Could anyone please help me with the following problem
My xml file is
==============
<fig id="F0000001">
<caption>Caption text</caption>
<image id="I0000001" image.class="halftone" image.type="jpg" print="0"
width="29-6" depth="23-6" pointer="I0000001.jpg"/>
</fig>
|
by: ameshkin |
last post by:
Hi,
Im pretty new at PHP and need help with something very simple. I wrote
a function which watermarks an image. The function works, but i can't
figure out how to output the image into a file.
I want to feed this function a URL, $image..and at the end of this
code, I want to overwrite the $image file with the new watermarked
$image file. Im getting an error stating that this file cannot be
opened.
|
by: John Williams |
last post by:
I'm writing a stagenography program to experiment with how it works.
The algorithm I'm using appears to be producing the correct
result...however I'm struggling with the file input. I never learned
file input/output very well (I self taught all the programming I
know...and my c++ book was not good) and so I'm not sure what's wrong
with this. The problem is the function void encodemsg(fstream *img,
fstream *msg, fstream *out, char key)
...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |