Re: Returning image/gif Content-type
Sandy Kydd (sandy@dmcsoft.com)
Fri, 07 Feb 1997 09:55:59 +0100
Message-Id: <32FAEE1F.40DB@dmcsoft.com>
Date: Fri, 07 Feb 1997 09:55:59 +0100
From: Sandy Kydd <sandy@dmcsoft.com>
To: desilva@netsinc.com
Subject: Re: Returning image/gif Content-type
Rujith de Silva wrote:
>
> Did you remember to recompile gd using the fcgi .h files and libs?
> Otherwise, gd would just write to stdout, which is the WRONG thing to
> do, because fcgi works by intercepting writes to stdout.
According to the fcgi docs, you can use the FCGI_ToFILE macro to convert
an fcgi filestream to a Unix filestream. And they've redefined stdout in
fcgi_stdio.h to use their own filestream. So if I do
gdImageGif(im, FCGI_ToFILE(stdout));
I shouldn't have to recompile the gd library, right?
Anyway, if this doesn't work I'll try writing to a file first and then
chucking this back, which is possibly what I was going to do eventually,
as I was hoping to cache some of the generated gifs that might get used
again.
> Is the app written in C, or in Perl using GD.pm? There is another
> problem with using GD.pm with fcgi that is more difficult to solve, but
> you shouldn't have a problem with combining gd and fcgi in C.
Its a C++ app. Being adventurous :-) Thanks to everyone who responded. I
haven't managed to get back to this yet, but hopefully I'll get it
working over the weekend.
Sandy
--
Sandy Kydd <sandy@dmcsoft.com>