Solved

CGI

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

ScreenConnect 6.0 Free Trial

Explore all the enhancements in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

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

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

810 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