0

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 ...

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by neronero
0

Is there any libary which can do that?
Or cgi program?
I don't want invent hot wather again.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.