Welcome to Dream.In.Code
Getting PHP Help is Easy!

Join 135,956 PHP Programmers for FREE! Get instant access to thousands of PHP experts, tutorials, code snippets, and more! There are 2,641 people online right now. Registration is fast and FREE... Join Now!




Making Thumbnails

 
Reply to this topicStart new topic

Making Thumbnails

klewlis
24 Sep, 2002 - 07:26 AM
Post #1

cur tu me vexas?
*****

Joined: 9 Nov, 2001
Posts: 1,723

I'm looking for a way to make thumbnails from jpgs without using the ImageCreateFromJPEG function.

Is it possible?

We have php 4 but don't have gd compiled... and don't want to take the time...lol
User is offlineProfile CardPM
+Quote Post

Quik
RE: Making Thumbnails
24 Sep, 2002 - 07:35 AM
Post #2

D.I.C Lover
Group Icon

Joined: 6 Mar, 2001
Posts: 3,750



Thanked: 1 times
My Contributions
Recently from LammaDog (Troy, an owner of guardianhosting)

"GD sucks for making thumbnails"

(or somthing along those lines) anyways, im not sure myself. sorry
User is offlineProfile CardPM
+Quote Post

Spider
RE: Making Thumbnails
24 Sep, 2002 - 08:02 AM
Post #3

Arachnid
****

Joined: 10 Jul, 2002
Posts: 769


My Contributions
I don't believe so, but I think imagecopyresized could be used to create thumbnails.

I've not used it myself so I'm not entirely sure though...
User is offlineProfile CardPM
+Quote Post

klewlis
RE: Making Thumbnails
24 Sep, 2002 - 09:42 AM
Post #4

cur tu me vexas?
*****

Joined: 9 Nov, 2001
Posts: 1,723

QUOTE(Spider @ Sep 24 2002, 11:02 AM)
I don't believe so, but I think imagecopyresized could be used to create thumbnails.

I've not used it myself so I'm not entirely sure though...

so that still requires gd... we might have to bite the bullet then and just recompile php....
User is offlineProfile CardPM
+Quote Post

gneato
RE: Making Thumbnails
24 Sep, 2002 - 07:12 PM
Post #5

<title>Untitled Document</title>
*****

Joined: 3 Sep, 2001
Posts: 1,311

klewlis, if your server has the convert command, you might try that. It works on my home server, for some reason it doesn't work on guardian, but it should work for you.

you pass the convert command to a shell using a passthru, exec, or system command.

passthru('convert image1.jpg -resize 200x400 image1_thumb.jpg');

make sure that the permissions on whatever folder the thumbs are to be created in are ok.
not sure if that's 100% correct; look around on google for help with the syntax.

'convert' is part of the Image Magick program.
User is offlineProfile CardPM
+Quote Post

klewlis
RE: Making Thumbnails
25 Sep, 2002 - 07:55 AM
Post #6

cur tu me vexas?
*****

Joined: 9 Nov, 2001
Posts: 1,723

QUOTE(gneato @ Sep 24 2002, 10:12 PM)
klewlis, if your server has the convert command, you might try that. It works on my home server, for some reason it doesn't work on guardian, but it should work for you.

you pass the convert command to a shell using a passthru, exec, or system command.

passthru('convert image1.jpg -resize 200x400 image1_thumb.jpg');

make sure that the permissions on whatever folder the thumbs are to be created in are ok.
not sure if that's 100% correct; look around on google for help with the syntax.

'convert' is part of the Image Magick program.

thanks! I'll give it a shot and let you know how it goes.
User is offlineProfile CardPM
+Quote Post

klewlis
RE: Making Thumbnails
25 Sep, 2002 - 08:53 AM
Post #7

cur tu me vexas?
*****

Joined: 9 Nov, 2001
Posts: 1,723

hey gneato, would you be able to find me your exact line? I've found a few on google but can't seem to get any to work, and image magick's site seems to be down...

thanks!
User is offlineProfile CardPM
+Quote Post

gneato
RE: Making Thumbnails
25 Sep, 2002 - 07:19 PM
Post #8

<title>Untitled Document</title>
*****

Joined: 3 Sep, 2001
Posts: 1,311

$im = the path and filename of the original
$thumb = the path and filename of the thumbnail to create

passthru("convert ".$im." -resize 231x231 ".$thumb);
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/1/08 09:17AM

Live PHP Help!

PHP Tutorials

Reference Sheets

PHP Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month