[REBOL] Re: Problems rendering an image + jpeg images not working
From: tim:johnsons-web at: 29-Aug-2002 8:46
Hi Rebols:
The same subject matter was mistakenly posted under two
different subjects. My apologies.
To recap: We are developing a project using the Axis Webcameras,
images are transferred from a remote location using their own
onboard Linux OS'es to a server. We are attempting to
convert the perl script found at the following location:
http://www.axis.com/techsup/cam_servers/tech_notes/index.htm
subtext heading:
Live Video on a high hit rate site
the active image load for IE is supposed to be handled
via JavaScript.
My attempt is to rewrite a (supposedly) functional perl
script-which my perl programmer partner can't get to
work- in rebol to push (upload/write) the camera image
to the webpage.
The multipart text conventions and the print/read statements
in the perl script are easy for me to understand and
*appeared* pretty straight forward.
I have now got an image "pushed" to the web page using
the methods suggested by Gabrielle and Scott Jones
(with much-appreciated help from the rest of you).
The method is:
t: read/binary %../images/camera-1/Bed-Tax-Logo.jpg
print "Content-type: image/jpeg^/"
set-modes system/ports/output [binary: true]
foreach u t [insert system/ports/output to-char u]
I was not able to find any examples like this in the documentation
mostly using the Rebol/Core User's Guide Version 2.3
Can anyone point me to rebol specific documentation on this?
for instance, I didn't know about set-modes until Gab and Scott
pointed them out. help set-modes is quite terse.
Thanks again! :-)
-tim-
* Gabriele Santilli <[g--santilli--tiscalinet--it]> [020829 06:34]:
> Hi Tim,
>
> On Thursday, August 29, 2002, 2:54:43 AM, you wrote:
>
> TJ> Now what do you think?
>
> You should either provide a Content-Transfer-Encoding header and
> use base 64 encoding, or send the image as binary as I have
> suggested in my previous email.
>
> Content-Transfer-Encoding: base64
> Content-Type: image/jpeg
>
> ....etc......
>
> The browser doesn't know what to do with your hex-encoded data...
>
> Regards,
> Gabriele.
> --
> Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
> Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
>
> --
> To unsubscribe from this list, please send an email to
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Tim Johnson <[tim--johnsons-web--com]>
http://www.alaska-internet-solutions.com
http://www.johnsons-web.com