You are here: Making thumbnails from images « All PHP « IT news, forums, messages
Making thumbnails from images

Posted by Flaming Corncob on 08/30/06 00:09

One of the things I'm in the process of doing is putting together a
photo album for our family. In the process of surfing through php.net
looking for other things I ran across some functions (imagecreate and
imagecreatefromjpeg for example) that appear to allow you to work with
images and (hopefully) make thumb nail images on-the-fly. Is this indeed
possible? I've tried a few things and I'm getting nowhere.

Here's some small code I'm playing around with.

<?
$src="./048807.jpg";
header("Content-type: image/jpeg");
$image=imagecreatefromjpeg($src);
imagejpeg($image);
?>

I keep getting (when I attempt to load the page):

The image ³...insert your site here...² cannot be displayed, because it
contains errors.


I don't seriously think it's this easy if it can be done at all, but
everything else I've tried ends the same way.

 

Navigation:

[Reply to this message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация