realbasic-betas.mbox
[Top] [All Lists]

[OFF] sending base64 encoded image data to browser (was stdout.write bro

To: REALbasic Betas <realbasic-betas at lists dot realsoftware dot com>
Subject: [OFF] sending base64 encoded image data to browser (was stdout.write broken?)
From: Andrew Bush <andrew dot bush at xtra dot co dot nz>
Date: Tue, 27 Jul 2004 12:20:06 +1200
Cc: Multiple recipients of RealBasic-OffTopic <rbofftopic at starionhost dot net>
Delivered-to: realbasic-betas at lists dot realsoftware dot com
References: <CB2FA5DD-DEC0-11D8-AC77-000393411DC8 at xtra dot co dot nz> <00c801c4731b$7b7bf910$2be15340 at Circe> <09825B30-DF4B-11D8-AC77-000393411DC8 at xtra dot co dot nz>
hi all,

ok...theres no doubt that stdout.write is broken with binary data, if I base64encode the image data it *all* gets written out correctly, if I dont it skips and jumps various bits and corrupts it. If printf is being used then Im betting that its default behavior is to interpret various chars as escape chars and thats causing the problem.

so I have a new problem...how to send base64 encoded image data to a browser and get it displayed :)

I need this to work in IE on mac and windows....I dont care so much about safari, mozilla or the others, for the purposes of this project 99% of the users are either in macos9 or various flavours of windows.

Ive tried using:

<IMG SRC="data:image/gif;base64,[data] ">
 and that works nicely on safari but breaks in windows and IE on mac.

Ive tried using various combinations of the headers
Content-Encoding: base64
Content-Transfer-Encoding: base64
Content-disposition: inline; filename="test.gif"
Content-disposition: attachment; filename="test.gif"

to encourage the browser to decode the base64 before rendering it, but none of it seems to work....it feels as though this *should* be possible...it definitely works in email messages going by various posts Ive found.

Has anyone else out there seen this done anywhere?


Yours cheerfully,


        Andrew Bush

_______________________________________________
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>