> 
> Torsten Luettgert schrieb:
> > Don't know about Embperl object, but for me, it "just works".
> > Here is some (reduced) code I use for delivering jpeg images:
> > 
> Interesting enough this doesn't work ( it outputs nothing! ):
> 
> > [-
> >    # some permission checking and obtaining $imgpath omitted
> >    if( -f $imgpath && $permission ) {
> >       $http_headers_out{'Content-Length'} = -s $imgpath;
> >       $http_headers_out{'Content-Type'} = 'image/jpeg';
> >       $http_headers_out{'Cache-Control'} = 'no-cache';
> >       $http_headers_out{'Pragma'} = 'no-cache';
> >       $http_headers_out{'Expires'} = '0';
>       my $image = Image::Magick->new();
>       $image->read($imgpath);
>       $image->do_something_or_not();
>       $image->write('-')
> >       exit 0;
> >    }
> > -]
> 
> and this is, err, strange behavior, I think.
> regards
> 

This might work with Apache 1.3 by chance, but it will not with Apache 2.0,
because $image->write('-') writes to STDOUT which is never send to the
client, at least not by default.

The best would be to do something like

$imgdata = $image -> <get_image> () ; 
# I don't know the correct ImageMagik function to use, 
# but it should return the image data
# -> no exit here
-][+ $imgdata +]

# Make sure you have no extra spaces here or newlines in your source.

Gerald



 
** Virus checked by BB-5000 Mailfilter ** 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to