-1

I have about 300 people wanting to view loads of images at a time but its not possible to download all the images to file. So i need a way where you can use a web url ("http://capes.reflexpro.co.uk/?user=" + p_177166_1_.getName()) to get the image to a path (string) without downloading.

Thx appreciate it

BiLLYBOB
  • 3
  • 1

1 Answers1

0

In order to view an image conventionally (i.e. through a web browser, image viewer, etc), you need to have a local copy of the image.

The image initially only exists at the URL you specify, or in other words, it exists only as a file on a remote machine. In order to view it, you need to download it to a directory on the client (i.e. local) machine. This is where the URL gets "converted" into a pathname - the pathname points to the local copy of the remote image. You can think of the URL as a path to the image as well - that URL string points to where the image is.

The reason we need to download a local copy of the image is because most images are stored in a compressed format (JPEG, PNG, TIFF). These need to be decompressed in order to figure out what color each pixel is. It's not efficient to do that on the remote server, so we transfer the compressed image, store it locally, decompress it, then display it. I have to imagine that most, if not all, web browsers will actually store the image on the local disk, partly to cache the image to ensure fast loading times for subsequent views of the same webpage, and partly to minimize RAM usage.

Nathan Hui
  • 26
  • 2