Solved

CGI

Posted on 2000-03-02
3
212 Views
Last Modified: 2013-11-18
Hi all. How can I receive gif/jpeg image
in my standard CGI Executable application (throw WebRequest event)?
0
Comment
Question by:zeko
  • 2
3 Comments
 
LVL 13

Accepted Solution

by:
Epsylon earned 50 total points
ID: 2576126
For example:

var fs: TFileStream;

fs := TFileStream.Create('image.jpg', fmOpenRead);
Response.ContentType := 'image/jpeg';
Response.ContentStream := fs;
Response.SendResponse;
fs.Free;



Instead of using a TFileStream you can use TJPEGImage.SaveToStream(<TMemoryStream>) and pass it to the ContentStream.
0
 
LVL 13

Expert Comment

by:Epsylon
ID: 2576133
0
 

Author Comment

by:zeko
ID: 2582975
Thanks.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The viewer will learn how to count occurrences of each item in an array.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question