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


Groups > comp.lang.javascript > #30036

Re: Read binary file

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups comp.lang.javascript
Subject Re: Read binary file
Date 2016-03-17 19:10 +0100
Organization PointedEars Software (PES)
Message-ID <2237637.9AE1fihV9u@PointedEars.de> (permalink)
References <nccmg2$kq7$1@gioia.aioe.org> <145821661.4prVZSFEgG@PointedEars.de> <ncdmil$1ser$1@gioia.aioe.org>

Show all headers | View raw


Herbert Kleebauer wrote:

> On 17.03.2016 01:04, Thomas 'PointedEars' Lahn wrote:
>> Herbert Kleebauer wrote:
>>> There is a picture (1.jpg) on web server A and I want to make
>>> a modified version available using a web server B. Because
                                                       ^^^^^^^
>>> of copyright I can't just copy the picture, modify it and
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>>> store it on server B. Instead a html file (test.htm) and
    ^^^^^^^^^^^^^^^^^^^^^
>>> a data file which describes how the picture has to be
>>> modified (diff.dat) is stored on server B. When a user
>>> loads the html file into his browsers, the javascript code
>>> loads the original picture from server A and the modification
>>> file from server B, changes the picture and displays it.
>> 
>> Your logic is flawed.  Either there it is a copyright violation to create
>> a modified version of the original, or there is not.  If there is a
>> copyright violation, then no matter how you create the modified version,
>> the issue remains: publishing the modified version would be a copyright
>> violation.
> 
> You didn't understand the scenario.

ACK, your claim confused me (see below), therefore I misread.

> […]
> Suppose the Server B provides this information:
> "download the picture http://ikomi.de/test/1.jpg and
> increase brightness by 10% and decrease contrast by 5%".
> Why does this violate any copyright?

Of itself it does not.  You were the one claiming that it would.  However, 
whether the whole use-case could constitute a copyright violation depends
on the extent of the modification and who has access to the modified 
version.
 
> Instead I could provide a batch script on Server B, which,
> when executed on the users PC, will use wget to download the
> picture and then use a scriptable image editor (like ImageMagicks
> convert.exe) to do the modification. But it would be much
> simpler to just use a web browser.

The Canvas API appears to be what you are looking for:

<https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Pixel_manipulation_with_canvas>

(CORS obviously cannot help you there as you do not control the server of 
the original work.)

>>> I'm not familiar with javascript,
>> There is no javascript.
> 
> ???????????

See the reference to the “ES Matrix” in my signature.

>>> or in which other way can I read a binary file from a different
>>> web server into a javascript array.
>> I know how (it is actually trivial if you think it through),

(JFTR: Canvas is not what I meant with this.  I had not thought of that 
possibility at the time.)
 
> I'm not even sure what the problem is. Does the browser refuse
> to read data from a different server than the html file was read
> for security reasons or does server A refuse to deliver the
> picture because of a referer header.

No.  STFW for “Same Origin Policy”.

-- 
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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-16 23:20 +0100
  Re: Read binary file Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 01:04 +0100
    Re: Read binary file Stefan Weiss <krewecherl@gmail.com> - 2016-03-17 02:34 +0100
      Re: Read binary file Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 07:56 +0100
    Re: Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-17 08:31 +0100
      Re: Read binary file Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 19:10 +0100
        Re: Read binary file Stefan Weiss <krewecherl@gmail.com> - 2016-03-17 19:59 +0100
          Re: Read binary file Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 21:43 +0100
            Re: Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-17 22:36 +0100
              Re: Read binary file Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 23:15 +0100
              Re: Read binary file Stefan Weiss <krewecherl@gmail.com> - 2016-03-18 00:43 +0100
                Re: Read binary file Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-18 17:22 +0100
                Re: Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-18 21:14 +0100
                Re: Read binary file Matthias Wiehl <mw@kwarg.de> - 2016-03-19 00:02 +0100
                Re: Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-19 08:48 +0100
                There is no javascript (was: Read binary file) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-19 13:02 +0100
                Re: There is no javascript (was: Read binary file) Mark - <nonemail@spamspamapam.net> - 2016-03-19 14:33 +0000
                Re: There is no javascript (was: Read binary file) Andrew Poulos <ap_prog@hotmail.com> - 2016-03-20 14:30 +1100
                Re: There is no javascript (was: Read binary file) Mark - <nonemail@spamspamapam.net> - 2016-03-20 13:07 +0000
                Re: There is no javascript (was: Read binary file) John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-20 10:39 +0000
                Re: There is no javascript (was: Read binary file) John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-20 11:19 +0000
                Re: There is no javascript (was: Read binary file) Philip Herlihy <thiswillbounceback@you.com> - 2016-03-21 17:06 +0000
                Re: Read binary file Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-22 17:18 -0700
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-23 10:12 +0100
                Re: Read binary file John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-23 16:27 +0000
                Re: Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-24 10:41 +0100
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-24 11:14 +0100
                Re: Read binary file John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-24 11:41 +0000
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-24 13:36 +0100
                Re: Read binary file John Harris <niam@jghnorth.org.uk.invalid> - 2016-03-25 10:07 +0000
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-25 11:28 +0100
                Re: Read binary file "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-03-24 11:31 +0100
                Re: Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-24 12:34 +0100
                Re: Read binary file "Christoph M. Becker" <cmbecker69@arcor.de> - 2016-03-24 17:15 +0100
                Re: Read binary file Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-03-24 11:33 +0000
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-24 11:05 +0100
                Re: Read binary file Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-23 20:16 -0700
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-24 10:36 +0100
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-24 11:18 +0100
                Re: Read binary file Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-27 10:22 -0700
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-28 00:18 +0200
                Re: Read binary file Scott Sauyet <scott.sauyet@gmail.com> - 2016-03-28 05:35 -0700
                Re: Read binary file "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-03-29 00:53 +0200
  Re: Read binary file Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-17 02:23 +0100
  Re: Read binary file Herbert Kleebauer <klee@unibwm.de> - 2016-03-17 08:42 +0100
  Re: Read binary file Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-03-20 22:03 +0000

csiph-web