Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Outputting Image from CGI...

From: jean:holzammer:faedv-n:bayern at: 6-Aug-2001 8:21

Hi, I have a cgi script that should read a picture file (cnt.png) and output it. I have this piece of code: print "Content-Type: image/png" print ["Content-Length:" size? %cnt.png] print "" print read/binary %cnt.png but printing a binary results in printing the rebol string representation of a binary! Instead of showing the image, the browser shows a text like this: #{ 89504E470D0A1A0A0000000D494844520000001E0000000A08020000002C1579 780000001374455874536F667477617265005245424F4C2F566965778FD91678 0000004D49444154789C63F8FF5F904688811E46BB30B800117ED5B81440F4A2 99C080AC07BFD1B8ECC6A58B811845F8ED467632165713F42F1E056882702EB1 46E3721A61A3F1E8A4341A698168683400AD6C267FCACBFB770000000049454E 44AE426082 } Any ideas ? Jean