[REBOL] Re: Outputting Image from CGI...
From: ryanc::iesco-dms::com at: 7-Aug-2001 15:39
Coincidentally I am trying to implement a image logger, but so far I am
having a problem getting nulls across. example:
>> gif-cgi: read/binary http://www.iesco-dms.com/line.r
>> gif-file: read/binary http://www.iesco-dms.com/line.gif
Here is the code I have been tooling around with:
prin "Content Type: image/gif"
prin to-char 10
prin to-char 10
;set-modes system/ports/output [binary: true]
prin to-string read/binary %line.gif
;con: open/binary console://
;insert con read/binary %line.gif
As you can see from my commented code, I have tried several methods. I
have tried this on Xitami under win98 using REBOL/Core 184.108.40.206.1, and
Apache under Linux running REBOL/Core 220.127.116.11.1. I get nothing at all
when I open a console port.
>> gif: read/binary http://www.iesco-dms.com/line-con.r ;console
version of the cgi
Any ideas, hints, pointers, suggestions, outright rude remarks, and/or
sentiments are welcome.
Gabriele Santilli wrote:
> Hello Jean!
> On 06-Ago-01, you wrote:
> HJ> to-string seems to convert any occurence of (hex) 0D 0D to
> HJ> 0D 0A ! ,ie 2 linefeed to linefeed + carriage return
> The culprit is not TO-STRING, but the fact that
> system/ports/output is not opened as binary.
> port: open/binary console://
> insert port read/binart %image.png
> close port
> or use SET-MODES on system/ports/output.
> Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
> Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.