Path: csiph.com!weretis.net!feeder4.news.weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: comp.lang.javascript Subject: Re: Read binary file Date: Thu, 17 Mar 2016 19:10:48 +0100 Organization: PointedEars Software (PES) Lines: 77 Message-ID: <2237637.9AE1fihV9u@PointedEars.de> References: <145821661.4prVZSFEgG@PointedEars.de> Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: solani.org 1458238249 20868 eJwFwYEBADAEA7CbGDrnTPH/CUv8hARh4WG+vtnk08c7MO0wXQzFu4hB4VSq49yUDsk1fDLSEUk= (17 Mar 2016 18:10:49 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 17 Mar 2016 18:10:49 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwFwQkBwDAIA0BLfElBzoDWv4TdwamcEwQDDy+ZOePBUp+48BXWRWv0WtMkamXlzbVaB4YF84O2b7W+/AE5FhTa Cancel-Lock: sha1:fnAZiT5bayrEiatPHfVs7GZwKUA= X-NNTP-Posting-Host: eJwFwQcBACAMAzBLQPfssJX6l0DiiB2TFh7mck1gH+q96vEFoMBUn+RVUZXV5usyDaFDfijAEZw= Xref: csiph.com comp.lang.javascript:30036 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: (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: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.