Path: csiph.com!news.mixmin.net!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 01:04:58 +0100 Organization: PointedEars Software (PES) Lines: 59 Message-ID: <145821661.4prVZSFEgG@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1458173099 31121 eJwNysEBwCAIA8CVihBCx6lB9h/B3vvgaSlGIgODoRrR1S83z0w8ZmWWbF9Z4j6+JNn3z4nCuh7pERA= (17 Mar 2016 00:04:59 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 17 Mar 2016 00:04:59 +0000 (UTC) User-Agent: KNode/4.14.2 X-User-ID: eJwVysERACEIBLCWRN0VygGB/kvw7psJFoX3bIIbjbZQa834ZDbDbR5qi609VlmWDwHY4Qd502qUNCbVK/L/D1YzFj4= Cancel-Lock: sha1:3qTWNZJY+2G9PxGBfz1KpAc9pZc= X-NNTP-Posting-Host: eJwFwQcBACAIBMBKMh40DrN/BO8gRlauBlMstjTKpnGFNlazfXZQU+8kEs1+2Sb4JD8foQ9BaRHx Xref: csiph.com comp.lang.javascript:30023 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. If there is no copyright violation with copying and modifying the original, then there is no need to go to great lengths to do the modification. I suggest that you at least read to get an idea if the publication of the modified version would constitute a copyright violation in the first place (I would suggest consulting a copyright lawyer as well depending on the presumed value of the original work and the fees to be expected from you or the organization you are working for in case of a possible copyright violation). > I'm not familiar with javascript, There is no javascript. > but with help of Google > I hacked together a few lines of code. But it only works if > all three files are on the same server: > > http://ikomi.de/test/test.htm > http://ikomi.de/test/1.jpg > http://ikomi.de/test/diff.dat > > > If the picture is on a different server, there seems to be > an access violation. How can I avoid this violation You cannot. The whole point of the Same Origin Policy is to prevent people from doing things like what you attempted. > 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), but until I am certain that you are not attempting a copyright violation through the back door, I will not say. IANAL. -- PointedEars FAQ: | SVN: Twitter: @PointedEars2 | ES Matrix: Please do not cc me. / Bitte keine Kopien per E-Mail.