Image from pages
I have created a load function, which accepts a URL, verifies the URL and returns the image inside a JInternalFrame in java so that manipulation of this image can be done. However, when one access an HTML page, there are many image or icons used on that page. However, only URLs with an image extension is accepted.
But on webpages, many images or icons are used. I want to be able to type the link of a website and retrieve all the images found in this website and displays them. However I am unable to do so.
Does anyone has an idea about this can be achieved?
a) Be sure you are not violating copyrights of the webpages and/or images by downloading and modifying those images - and yes, downloading, modifying (or not), and using that image in any way would typically qualify as a violation of copyright b) Parse the webpage and look for URL's that point to images (gif, jpg) using a regular expression (see Lesson: Regular Expressions (The Java™ Tutorials > Essential Classes))