Solved

CGI

Posted on 2000-03-02
3
207 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

I will show you how to create a ASP.NET Captcha control without using any HTTP HANDELRS or what so ever. you can easily plug it into your web pages. For Example a = 2 + 3 (where 2 and 3 are 2 random numbers) Session("Answer") = 5 then we…
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now