Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #25568 > unrolled thread

How to load binary image with Javascript with NO BASE64 conversion

Started byRichard Maher <maher_rjSPAMLESS@hotmail.com>
First post2014-07-27 10:23 +0800
Last post2014-07-27 21:58 +0200
Articles 19 — 8 participants

Back to article view | Back to comp.lang.javascript


Contents

  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

#25568 — How to load binary image with Javascript with NO BASE64 conversion

FromRichard Maher <maher_rjSPAMLESS@hotmail.com>
Date2014-07-27 10:23 +0800
SubjectHow to load binary image with Javascript with NO BASE64 conversion
Message-ID<lr1ns0$7hd$1@speranza.aioe.org>
Hi,

Can someone please provide an example of loading a binary image file 
that is being streamed from a server and accessed via an AJAX call?

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?

Cheers Richard

[toc] | [next] | [standalone]


#25569

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-07-27 09:44 +0200
Message-ID<XnsA377631C62384eejj99@194.109.133.133>
In reply to#25568
Richard Maher <maher_rjSPAMLESS@hotmail.com> wrote on 27 jul 2014 in 
comp.lang.javascript:

> Can someone please provide an example of loading a binary image file 

All image files are binary, surly?

> that is being streamed from a server 

in essense only the stream is sent, not the file.

> and accessed via an AJAX call?

Do you mean commanded to be sent?
 
> 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?

Do you mean serverside Javascript code example?

What do you mean by "loading" in this case? Not displaying?

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'?

What is btoa(), surely not native JS?

What advantage is the use of AJAX here?

Methinks you cannot find the answer, because the Q is not exact.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#25570

FromRichard Maher <maher_rjSPAMLESS@hotmail.com>
Date2014-07-27 17:03 +0800
Message-ID<lr2f86$m8m$1@speranza.aioe.org>
In reply to#25569
On 7/27/2014 3:44 PM, Evertjan. wrote:
> Richard Maher <maher_rjSPAMLESS@hotmail.com> wrote on 27 jul 2014 in
> comp.lang.javascript:
>
>> Can someone please provide an example of loading a binary image file
>
> All image files are binary, surly?
>
>> that is being streamed from a server
>
> in essense only the stream is sent, not the file.
>
>> and accessed via an AJAX call?
>
> Do you mean commanded to be sent?
>
>> 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?
>
> Do you mean serverside Javascript code example?
>
> What do you mean by "loading" in this case? Not displaying?
>
> 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'?
>
> What is btoa(), surely not native JS?
>
> What advantage is the use of AJAX here?
>
> Methinks you cannot find the answer, because the Q is not exact.
>

Right, you, pointed ears and the rest of your merry bunch of personality 
disorders can just fuck off!

Actually why don't you go and protect that plane wreck and hang around a 
bit longer than you compatriots did in Srebrenica. I sure the rebels 
will enjoy the scintillating repartee from pointless pricks like you.

[toc] | [prev] | [next] | [standalone]


#25572

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2014-07-27 14:35 +0200
Message-ID<2977470.YnO8eVvalL@PointedEars.de>
In reply to#25570
</killfile>

Richard Maher wrote:

> On 7/27/2014 3:44 PM, Evertjan. wrote:
>> Methinks you cannot find the answer, because the Q is not exact.
> 
> Right, you, pointed ears and the rest of your merry bunch of personality
> disorders can just fuck off!
> 
> Actually why don't you go and protect that plane wreck and hang around a
> bit longer than you compatriots did in Srebrenica. I sure the rebels
> will enjoy the scintillating repartee from pointless pricks like you.

These reactions, ongoing address munging, and using a troll server,
will surely get you the answers that you seek.

<killfile>

-- 
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.

[toc] | [prev] | [next] | [standalone]


#25582

FromErwin Moller <erwinmollerusenet@xs4all.nl>
Date2014-07-28 10:55 +0200
Message-ID<53d61001$0$2845$e4fe514c@news2.news.xs4all.nl>
In reply to#25570
On 7/27/2014 11:03 AM, Richard Maher wrote:
> On 7/27/2014 3:44 PM, Evertjan. wrote:
>> Richard Maher <maher_rjSPAMLESS@hotmail.com> wrote on 27 jul 2014 in
>> comp.lang.javascript:
>>
>>> Can someone please provide an example of loading a binary image file
>>
>> All image files are binary, surly?
>>
>>> that is being streamed from a server
>>
>> in essense only the stream is sent, not the file.
>>
>>> and accessed via an AJAX call?
>>
>> Do you mean commanded to be sent?
>>
>>> 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?
>>
>> Do you mean serverside Javascript code example?
>>
>> What do you mean by "loading" in this case? Not displaying?
>>
>> 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'?
>>
>> What is btoa(), surely not native JS?
>>
>> What advantage is the use of AJAX here?
>>
>> Methinks you cannot find the answer, because the Q is not exact.
>>
>
> Right, you, pointed ears and the rest of your merry bunch of personality
> disorders can just fuck off!
>
> Actually why don't you go and protect that plane wreck and hang around a
> bit longer than you compatriots did in Srebrenica. I sure the rebels
> will enjoy the scintillating repartee from pointless pricks like you.
>

Wow, *that* was totally uncalled for, "Richard Maher".
Evertjan gave you a very sensible response, and this is your reaction?
If you actually tried to understand what Evertjan wrote, you would 
probably have solved your problem by now.
(Or actually, as I expect, you would have found out you were approaching 
your problem from a crazy direction: A self-induced problem)

Erwin Moller

PS1: Evertjan !== Thomas Lahn. I expect the latter killfiled you long ago.
PS2: Get yourself educated on Srebrenica.


-- 
"That which can be asserted without evidence, can be dismissed without 
evidence."
-- Christopher Hitchens

[toc] | [prev] | [next] | [standalone]


#25584

FromRichard Maher <maher_rjSPAMLESS@hotmail.com>
Date2014-07-28 18:09 +0800
Message-ID<lr57g6$be5$2@speranza.aioe.org>
In reply to#25582
On 7/28/2014 4:55 PM, Erwin Moller wrote:
> On 7/27/2014 11:03 AM, Richard Maher wrote:

> Wow, *that* was totally uncalled for, "Richard Maher".
> Evertjan gave you a very sensible response, and this is your reaction?
> If you actually tried to understand what Evertjan wrote, you would
> probably have solved your problem by now.
> (Or actually, as I expect, you would have found out you were approaching
> your problem from a crazy direction: A self-induced problem)
>
> Erwin Moller
>
> PS1: Evertjan !== Thomas Lahn. I expect the latter killfiled you long ago.
> PS2: Get yourself educated on Srebrenica.
>
>
  Exactly which part of "Fuck Off!" were you struggling with dipshit?

[toc] | [prev] | [next] | [standalone]


#25586

FromErwin Moller <erwinmollerusenet@xs4all.nl>
Date2014-07-28 16:22 +0200
Message-ID<53d65cb4$0$2910$e4fe514c@news2.news.xs4all.nl>
In reply to#25584
On 7/28/2014 12:09 PM, Richard Maher wrote:
> On 7/28/2014 4:55 PM, Erwin Moller wrote:
>> On 7/27/2014 11:03 AM, Richard Maher wrote:
>
>> Wow, *that* was totally uncalled for, "Richard Maher".
>> Evertjan gave you a very sensible response, and this is your reaction?
>> If you actually tried to understand what Evertjan wrote, you would
>> probably have solved your problem by now.
>> (Or actually, as I expect, you would have found out you were approaching
>> your problem from a crazy direction: A self-induced problem)
>>
>> Erwin Moller
>>
>> PS1: Evertjan !== Thomas Lahn. I expect the latter killfiled you long
>> ago.
>> PS2: Get yourself educated on Srebrenica.
>>
>>
>   Exactly which part of "Fuck Off!" were you struggling with dipshit?
>

That part was clear, Richard.
But since I am not a member of the group "the rest of your merry bunch 
of personality disorders", it didn't apply to me.

Why are you so immensely frustrated?
Can't handle your current job?

Erwin Moller

-- 
"That which can be asserted without evidence, can be dismissed without 
evidence."
-- Christopher Hitchens

[toc] | [prev] | [next] | [standalone]


#25587

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2014-07-28 21:55 +0200
Message-ID<2277857.S6fZp3vA54@PointedEars.de>
In reply to#25582
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.

[toc] | [prev] | [next] | [standalone]


#25588

FromScott Sauyet <scott.sauyet@gmail.com>
Date2014-07-28 20:00 -0700
Message-ID<22ac428f-ecdf-4f39-9802-cd94b5ff10e5@googlegroups.com>
In reply to#25587
Thomas 'PointedEars' Lahn wrote:
> 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])

Or perhaps, given the subsequent messages from Mr. Maher, it could lead in 
fact to better understanding.  :-)

  -- Scott

[toc] | [prev] | [next] | [standalone]


#25589

FromThomas 'PointedEars' Lahn <PointedEars@web.de>
Date2014-07-29 13:51 +0200
Message-ID<4178133.se5FDmHEIz@PointedEars.de>
In reply to#25587
Thomas 'PointedEars' Lahn wrote:

> Erwin Moller wrote:
>> On 7/27/2014 11:03 AM, Richard Maher wrote:
>>> On 7/27/2014 3:44 PM, Evertjan. wrote:
>>>> 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).
> 
> […]
> 
> <https://developer.mozilla.org/en-US/docs/Web/API/Window.btoa>

It turned out that, at least in Google V8 JavaScript in Chromium 34, btoa() 
and atob() are properties of the global object as well, so I will add 
testcases to the ES Matrix.  It would be good to know that the major 
ECMAScript implementations include a base64 encoder/decoder.

-- 
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.

[toc] | [prev] | [next] | [standalone]


#25580

FromEli the Bearded <*@eli.users.panix.com>
Date2014-07-28 05:54 +0000
Message-ID<eli$1407280154@qz.little-neck.ny.us>
In reply to#25569
In comp.lang.javascript, Evertjan. <exxjxw.hannivoort@inter.nl.net> wrote:
> Richard Maher <maher_rjSPAMLESS@hotmail.com> wrote on 27 jul 2014 in 
> comp.lang.javascript:
> > Can someone please provide an example of loading a binary image file 
> All image files are binary, surly?

Not in the slightest. Postscript (eg Adobe Illustrator files) is, like
the proposed scenario, usually just text, but sometimes has ASCII-fied
binary or compressed text portions. Postscript usually uses base85
encoding, though. SVG is XML. Have you heard of "typewriter art"? It was
later reborn as "ASCII art" when computers became popular. Many older
Unix image formats are text based. Xfig saves as text. The xpm files are
syntactically pure C code.

> Methinks you cannot find the answer, because the Q is not exact.

With computers, stating the problem correctly is often 90% to seeing the
solution. (And the 10% of the time its finding out the problem cannot be
solved.)

Elijah
------
see, eg, the halting problem

[toc] | [prev] | [next] | [standalone]


#25581

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-07-28 10:05 +0200
Message-ID<XnsA37866AF3F0CEeejj99@194.109.133.133>
In reply to#25580
Eli the Bearded <*@eli.users.panix.com> wrote on 28 jul 2014 in 
comp.lang.javascript:

> In comp.lang.javascript, Evertjan. <exxjxw.hannivoort@inter.nl.net> wrote:
>> Richard Maher <maher_rjSPAMLESS@hotmail.com> wrote on 27 jul 2014 in 
>> comp.lang.javascript:
>> > Can someone please provide an example of loading a binary image file 
>> All image files are binary, surly?
> 
> Not in the slightest. Postscript (eg Adobe Illustrator files) is, like
> the proposed scenario, usually just text, but sometimes has ASCII-fied
> binary or compressed text portions. Postscript usually uses base85
> encoding, though. SVG is XML. Have you heard of "typewriter art"? It was
> later reborn as "ASCII art" when computers became popular. Many older
> Unix image formats are text based. Xfig saves as text. The xpm files are
> syntactically pure C code.

Imagem, seen that way, is an ill-defined entity.

Text is also binary, in the sense of a file or a datastream.

>> Methinks you cannot find the answer, because the Q is not exact.
> 
> With computers, stating the problem correctly is often 90% to seeing the
> solution. (And the 10% of the time its finding out the problem cannot be
> solved.)

Indeed, you could say in thos cases the problem ceases to exist.


-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#25571

FromDenis McMahon <denismfmcmahon@gmail.com>
Date2014-07-27 11:06 +0000
Message-ID<lr2mgf$sed$1@dont-email.me>
In reply to#25568
On Sun, 27 Jul 2014 10:23:55 +0800, Richard Maher wrote:

> Can someone please provide an example of loading a binary image file
> that is being streamed from a server and accessed via an AJAX call?

See https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest and 
associated material.

-- 
Denis McMahon, denismfmcmahon@gmail.com

[toc] | [prev] | [next] | [standalone]


#25583

FromRichard Maher <maher_rjSPAMLESS@hotmail.com>
Date2014-07-28 18:04 +0800
Message-ID<lr5776$all$1@speranza.aioe.org>
In reply to#25571
On 7/27/2014 7:06 PM, Denis McMahon wrote:
> On Sun, 27 Jul 2014 10:23:55 +0800, Richard Maher wrote:
>
>> Can someone please provide an example of loading a binary image file
>> that is being streamed from a server and accessed via an AJAX call?
>
> See https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest and
> associated material.
>
Thanks Denis.

For anyone else needing an example the one at this site looks best to me: -
http://www.html5rocks.com/en/tutorials/file/xhr2/


:               :                  :                  :

xhr.responseType = 'blob';

xhr.onload = function(e) {
   if (this.status == 200) {
     var blob = this.response;

     var img = document.createElement('img');
     img.onload = function(e) {
       window.URL.revokeObjectURL(img.src); // Clean up after yourself.
     };
     img.src = window.URL.createObjectURL(blob);
     document.body.appendChild(img);
     ...
   }
};

[toc] | [prev] | [next] | [standalone]


#25573

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2014-07-27 10:46 -0700
Message-ID<b9088a10-4fc1-40d4-864a-f3acbf52c91e@googlegroups.com>
In reply to#25568
On Saturday, July 26, 2014 9:23:55 PM UTC-5, Richard Maher wrote:

> Can someone please provide an example of loading a binary image file 
> that is being streamed from a server and accessed via an AJAX call?
> 
> 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?

Why can't you simply:

var foo = new Image()
foo.onload = ...
foo.src = imgSrc;

Is this image not stored as an image on the server?

[toc] | [prev] | [next] | [standalone]


#25575

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-07-27 19:57 +0200
Message-ID<XnsA377CAF43C525eejj99@194.109.133.133>
In reply to#25573
"Michael Haufe (TNO)" <tno@thenewobjective.com> wrote on 27 jul 2014 in 
comp.lang.javascript:

> Is this image not stored as an image on the server?

How would a image be stored on a server as an image, 
or not as an image?

A server does not mind how the client infers the data to be.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [next] | [standalone]


#25576

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2014-07-27 12:25 -0700
Message-ID<1e4719bd-f34c-4eaf-81ad-1472af51ca5e@googlegroups.com>
In reply to#25575
On Sunday, July 27, 2014 12:57:04 PM UTC-5, Evertjan. wrote:

> How would a image be stored on a server as an image, 
> or not as an image?

I'm referring to the difference between representation and interpretation of data referred to as "image". For example, if an "image" is stored in a file called foo.txt, or foo.dat as base64, the intent may be for that to be an image but this is not clear based on simply looking at that file. If a client then requests that file, it would be unsurprising if the server responds with a type of text/plan instead of image/png. 

> A server does not mind how the client infers the data to be.

The server has no need to care how the data is interpreted, but the client may care about the response type. 

The point of the question to the OP is to obtain more information on how this resource is being served to the client.

[toc] | [prev] | [next] | [standalone]


#25577

From"Michael Haufe (TNO)" <tno@thenewobjective.com>
Date2014-07-27 12:32 -0700
Message-ID<e38ded5d-e7bb-4b62-84b3-5d2b5f98a307@googlegroups.com>
In reply to#25576
On Sunday, July 27, 2014 2:25:34 PM UTC-5, Michael Haufe (TNO) wrote:

> [...] it would be unsurprising if the server responds with a type of text/plan instead of image/png.

"text/plain" of course

[toc] | [prev] | [next] | [standalone]


#25578

From"Evertjan." <exxjxw.hannivoort@inter.nl.net>
Date2014-07-27 21:58 +0200
Message-ID<XnsA377DF7F0D638eejj99@194.109.133.133>
In reply to#25576
"Michael Haufe (TNO)" <tno@thenewobjective.com> wrote on 27 jul 2014 in
comp.lang.javascript: 

> The point of the question to the OP is to obtain more information on how
> this resource is being served to the client. 

Okay.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.javascript


csiph-web