0

Let's say there is an HTML document with something of this nature excluding <html> and <body> tags:

<div style="background:url('../img/test.jpg') no-repeat; background-size:cover;">
</div>

Now lets say I didn't really want test.jpg, what I did want was the projection of test.jpg I was getting off the div. Is this possible to do with something like JavaScript? How would someone go about this? I'll need this to be able to be done via a program or script for it to be useful to me. I haven't really tried anything as I don't think it's possible but maybe someone out there knows differently.

Web_Designer
  • 72,308
  • 93
  • 206
  • 262
Royalty
  • 392
  • 2
  • 10
  • do you want to grap it via code or simply copy it? if second, try to open http://domain/img/test.jpg in your browser. all images shown in the web can be stolen, you cant write a 100% protection because the browser has to read it too – TypedSource Apr 13 '17 at 00:51
  • via code, I know it's easy to copy, I don't really want the image, I want the image I see on the HTML document, for example, if the background is warped on the page or positioned differently within the div it's in, I want to grab it as it is and to be able to grab the div area and whatever is inscribed in it, and save it as an image. – Royalty Apr 13 '17 at 00:53
  • javascript can not write to filesystem directly. but you can send the image url to a php script what gets the image via file_get_contents and write it to a in a file stream – TypedSource Apr 13 '17 at 00:56

0 Answers0