Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25587
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: How to load binary image with Javascript with NO BASE64 conversion |
| Date | 2014-07-28 21:55 +0200 |
| Organization | PointedEars Software (PES) |
| Message-ID | <2277857.S6fZp3vA54@PointedEars.de> (permalink) |
| References | <lr1ns0$7hd$1@speranza.aioe.org> <XnsA377631C62384eejj99@194.109.133.133> <lr2f86$m8m$1@speranza.aioe.org> <53d61001$0$2845$e4fe514c@news2.news.xs4all.nl> |
Erwin Moller wrote: > On 7/27/2014 11:03 AM, Richard Maher wrote: >> On 7/27/2014 3:44 PM, Evertjan. wrote: >>> Richard Maher […] wrote […]: >>>> Can someone please provide an example of loading a binary image file >>> >>> All image files are binary, surly? (_surely_ [the typo changes the meaning, could lead to misunderstandings]) Not all image files are what is usually referred to as a binary file (as opposed to plain text). For example, one widely supported Web image format is Scalable Vector Graphics (SVG), which is XML-based (and can be manipulated with ECMAScript). > […] >>>> I've been googleing for ages and can't find anything without btoa() and >>>> base64 encoding :-( >>>> >>>> Can I just use data URIs and application/octet-stream or + uint8array >>>> or some other? >>> >>> […] >>> What do you mean by streaming? Everything that is sent from server to >>> client browser is streaming, like the greeks said: 'panta rei, kai ouden >>> menei'? Not everything that is sent from a server to a client (browser) is a stream. The defining property of a stream is that there is no defined amount of data to be sent. See, for example, video streaming. >>> What is btoa(), surely not native JS? btoa() (presumably, “*b*inary *to* ‘a’-for-character”) is a method of the host object referred to by the host-defined “window” property of the ECMAScript global object, originating from DOM Level 0, for base64 encoding; it takes a String value (object or primitive) and returns a primitive string value. window.atob() is its decoding counterpart. For historical reasons, it is available at least in Gecko-based and WebKit-based browsers (I have not tested others yet). A method of a host object, it is not formally specified in the ECMAScript Language Specification, but because the object referred to by the “window” property at least tends to be in the scope chain of script code in a Web browser environment, it can be used there as if it was a property of the global object. (But I do not recommend that.) This fact gives further credence to the idea that there is no “javascript” (or “Javascript”) in the way that these terms are used by some for a single, universally implemented programming language that just has “dialects” and to which host objects are considered to belong (without referring to them as such, confusing the issue). <https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa> >>> What advantage is the use of AJAX here? XHR allows one to process the data contained in the response message body before exposing it to the layout engine, and provides more control for handling error conditions. >> [invectives] > > Wow, *that* was totally uncalled for, "Richard Maher". ACK. > Evertjan gave you a very sensible response, Only partially. > […] > PS1: Evertjan !== Thomas Lahn. I expect the latter killfiled you long ago. Unfortunately yes, I had to. If only that would have prevented me from reading that quoted posting as well… > PS2: Get yourself educated on Srebrenica. ACK. -- PointedEars FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/> Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix> Please do not Cc: me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to load binary image with Javascript with NO BASE64 conversion Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2014-07-27 10:23 +0800
Re: How to load binary image with Javascript with NO BASE64 conversion "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-27 09:44 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2014-07-27 17:03 +0800
Re: How to load binary image with Javascript with NO BASE64 conversion Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-27 14:35 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion Erwin Moller <erwinmollerusenet@xs4all.nl> - 2014-07-28 10:55 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2014-07-28 18:09 +0800
Re: How to load binary image with Javascript with NO BASE64 conversion Erwin Moller <erwinmollerusenet@xs4all.nl> - 2014-07-28 16:22 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-28 21:55 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion Scott Sauyet <scott.sauyet@gmail.com> - 2014-07-28 20:00 -0700
Re: How to load binary image with Javascript with NO BASE64 conversion Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-07-29 13:51 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion Eli the Bearded <*@eli.users.panix.com> - 2014-07-28 05:54 +0000
Re: How to load binary image with Javascript with NO BASE64 conversion "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-28 10:05 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion Denis McMahon <denismfmcmahon@gmail.com> - 2014-07-27 11:06 +0000
Re: How to load binary image with Javascript with NO BASE64 conversion Richard Maher <maher_rjSPAMLESS@hotmail.com> - 2014-07-28 18:04 +0800
Re: How to load binary image with Javascript with NO BASE64 conversion "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-07-27 10:46 -0700
Re: How to load binary image with Javascript with NO BASE64 conversion "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-27 19:57 +0200
Re: How to load binary image with Javascript with NO BASE64 conversion "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-07-27 12:25 -0700
Re: How to load binary image with Javascript with NO BASE64 conversion "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-07-27 12:32 -0700
Re: How to load binary image with Javascript with NO BASE64 conversion "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-07-27 21:58 +0200
csiph-web