Solved

Displaying generated images

Posted on 1998-11-16
2
160 Views
Last Modified: 2013-12-25
Is it possible to change content-type within a page?  I want to put out some HTML and then change the content-type to image/gif and then throw in my generated gif output and then switch back to HTML.  The problem is that my directive to change the content-type to image/gif is just appearing as text on the page.  Can this be done or do I need to put the gif in a file and display it within HTML? Or this there a better way to deal with dynamically generated images within the page?  Thanks.
0
Comment
Question by:cmulzer
2 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 100 total points
Comment Utility
You can't switch from MIME-type within one document. If you want to display a generated image, do it in a way like this:


<img src="/cgi-bin/generated_image.pl?this=querystring">

in which generated_image.pl is a cgi which generates the image.
0
 

Author Comment

by:cmulzer
Comment Utility
Thanks!  That was just what I needed.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Problem to be resolved in this article Currently, development of website and web application can be done without writing thousands of lines of programming code by hand. Description This can be done through by using a open source framework such …
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

762 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

7 Experts available now in Live!

Get 1:1 Help Now