473,406 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

thumbnail image from a web link

Does anyone know of a way of doing this without uploading the image?
Presumably it needs a rendering engine - is such a thing possible. Apologies
if this has already been discussed - I was referred to this group from
elsewhere, but a search for the topic has not unearthed anything.

Cheers,

Ian
Jul 17 '05 #1
7 2274
On Wed, 4 May 2005 20:46:52 +0100, "Ian King" <ia*****@bigfoot.com> wrote:
Does anyone know of a way of doing this without uploading the image?
Presumably it needs a rendering engine - is such a thing possible. Apologies
if this has already been discussed - I was referred to this group from
elsewhere, but a search for the topic has not unearthed anything.


PHP can grab images from other web servers using file() and so on (provided
fopen_wrappers is on which it usually is, if not there are other ways).
http://uk.php.net/file

The GD functions can resize images in memory
http://uk.php.net/image
http://uk.php.net/manual/en/function...fromstring.php
http://uk.php.net/manual/en/function...yresampled.php

GD works best for line graphics rather than photos, but it will work on photos
anyway; it's fairly commonly installed since it's bundled with PHP.

A better alternative quality- and speed-wise is ImageMagick, but the PHP
module for that is rarely installed so you probably have to spawn an external
process with exec() or similar.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:ai********************************@4ax.com...
On Wed, 4 May 2005 20:46:52 +0100, "Ian King" <ia*****@bigfoot.com> wrote: PHP can grab images from other web servers using file() and so on
(provided
fopen_wrappers is on which it usually is, if not there are other ways).
http://uk.php.net/file

The GD functions can resize images in memory
http://uk.php.net/image
http://uk.php.net/manual/en/function...fromstring.php
http://uk.php.net/manual/en/function...yresampled.php

GD works best for line graphics rather than photos, but it will work on
photos
anyway; it's fairly commonly installed since it's bundled with PHP.

A better alternative quality- and speed-wise is ImageMagick, but the PHP
module for that is rarely installed so you probably have to spawn an
external
process with exec() or similar.

Sorry I probably didn't make my post clear the first time round. I was
wondering if php could grab an image of a web page (rather than from a web
page) This would probably mean some way of making php act as a browser, or
am I barking up the wrong tree?

Done manually, I srcreengrab the borswer page, reduce it to a thmbnail and
upload it.(or upload it and reduce it to a thumbnail using php - there are
disadvantages with either method) I was wondering if there was a way to do
this by "simply" supplying the php script with the web address.

Ian
Jul 17 '05 #3
On Wed, 4 May 2005 21:41:27 +0100, "Ian King" <ia*****@bigfoot.com> wrote:
Sorry I probably didn't make my post clear the first time round. I was
wondering if php could grab an image of a web page (rather than from a web
page) This would probably mean some way of making php act as a browser, or
am I barking up the wrong tree?
Ah - yes it would. Much more awkward.
Done manually, I srcreengrab the borswer page, reduce it to a thmbnail and
upload it.(or upload it and reduce it to a thumbnail using php - there are
disadvantages with either method) I was wondering if there was a way to do
this by "simply" supplying the php script with the web address.


Not the easiest thing to search for either, since most of the keywords come up
with the more common situation of plain image thumbnails.

I can't think of a simple way of doing this, they're all relatively
complicated.

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #4
*** Ian King wrote/escribió (Wed, 4 May 2005 21:41:27 +0100):
Done manually, I srcreengrab the borswer page, reduce it to a thmbnail and
upload it.(or upload it and reduce it to a thumbnail using php - there are
disadvantages with either method) I was wondering if there was a way to do
this by "simply" supplying the php script with the web address.


Sorry, I don't know the answer. But I know the question: you want to render
a web page from your web server (which also implies, of course, downloading
HTML and linked elements: images, CSS...). What you need is a command line
HTML renderer. If there's a publicly available one, I don't know.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
Jul 17 '05 #5
> Does anyone know of a way of doing this without uploading the image?

One way to do it : get the page in a browser, capture the screen, save it as
an image or send the stream without saving. Which means there needs to be a
graphic environnement on the computer doing all this (a server ?). Which
means it is a big problem if you run your web server on a linux machine (as
it is a very bad idea to have a graphic environnement set on a linux web
server). Anyway there are tools doing all this on Windows and on Linux, and
you can call them from PHP using the exec() function. As my web servers
(Linux) do not have a graphic environnement, I use the two first tools from
my Windows machine and then synchronises the data with the online web
server. It works really well ! You can grab a page as it apears on the
screen, chose how big your screen has to be. You can even grab a whole page
in a single image (everything you can see when you scroll the page), and it
even works for pages with Flash (if your web browser has the Flash Player).

Windows :
http://www.html2jpg.com/download.htm (blackbox version)
http://www.guangmingsoft.net/index.htm (HTML Snapshot - bottom of the page)

Linux (Perl script) :
http://marginalhacks.com/Hacks/html2jpg/


Jul 17 '05 #6
> Does anyone know of a way of doing this without uploading the image?

Another idea :
1. html > pdf or html > postscript
2. pdf > image or postscript > image
Jul 17 '05 #7
Ian King wrote:
Does anyone know of a way of doing this without uploading the image?
Presumably it needs a rendering engine - is such a thing possible. Apologies if this has already been discussed - I was referred to this group from elsewhere, but a search for the topic has not unearthed anything.


It's here <news:iq********************@bresnan.com>

--
<?php echo 'Just another PHP saint'; ?>
Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client...
2
by: Mark R. Dawson | last post by:
Hi all, I have a directory full of images (most over 2MB in size) I was to show each image as a thumbnail on a form, however in order to create a thumbnail I have to open the complete image then...
2
by: David Elliott | last post by:
I am creating a control to display GIF/JPEG images for my website. The control has a Panel to hold the images. I would like to perform the following. 1) store the original on disk and create a...
4
by: moondaddy | last post by:
I have an app where users will upload photos to their shopping cart. When they review their cart I need to include a light weight thumbnail of the image they uploaded. how can I take the image a...
1
by: Xah Lee | last post by:
The following is a program to generate thumbnail images for a website. Useful, if you want to do that. It is used to generate the thumbnails for my “Banners, Damsels, and Mores†project...
1
by: savvy | last post by:
I want to create a Thumbnail Image from a given large Image and bind it to the Datalist with the datasource being Database. I followed this link given below Creating Thumbnail Images on the fly...
8
by: barb | last post by:
So that the world at large benefits from our efforts, here is one fully documented way to use Windows Irfanview freeware to create thumbnail web galleries (http://www.irfanview.com). STEP 1:...
4
by: karsting | last post by:
I am using this css. I have a link from the thumbnail to another page, but need to go to the same link on the pop-up image. IN STYLES } .thumbnail{ position: relative; z-index: 0;
13
by: Casimir Pohjanraito | last post by:
I have a list of links, with a thumbnail image hidden(resized) next to the link. Complete html&css at end of this post. CSS for the link resizes the image on a:hover. All is good, except the...
8
by: Arno R | last post by:
Hi all. When I need to search for pictures, I always have too choose thumbnail-view manually. Is it possible to open the common dialog in thumbnail-view programmatically? Example ?? At the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.