Hi I would like to make cgi-bin program which will make dynamic pictures.
I know how to make cgi program which would output simple html file
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
cout <<"Content-type: text/html\r\n\r\n" << endl;
try
{
cout<<"<html><body><h1>Test</h1></body></html>"<<endl;
}
catch (exception e)
{
cout<<" Nemorem prikazati slike."<<endl;
}
return 0;
}
So how should I change this program that insted of html page I would output a jpeg image?
First I have to change frst output to: "Content-type: Image/jpeg\r\n\r\n"
After that ...