Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

79 users online



free script...get your free script here...

free script...get your free script here...

Currently viewing this thread: 1 (0 members and 1 guests)


Page 2 out of 3
steffanharris

steffanharris

Status: Offline!

wow!

makes life so much easier:rolleyes:

ikellen

ikellen

dude
Status: Offline!

This is alot like the code at deviantart that jark uses for thumbnails. Awesome!

___________________

http://www.kellenholt.com/images/eg_sig.gif
:: KellenHolt.com
:: KellenHolt.com Forums - No Frills Discussion
:: Need Small Hosting Plan? CLICK

selectskate

selectskate

Status: Offline!

Great script but I'm having a few problems. Everytime I go to the page it comes up with

Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/virtual/site49/fst/var/www/html/multimedia/photography/simon.php on line 105

I don't know what to do.... Here is how I have the script.

PHP:



<?php
function  ImageResize($source,$dest,$dest_w,$dest_h,$dest_q) {
// Get some info about the source image first
        
if(!file_exists($source)) {
            print 
"Source file does not exist";
            return 
false;
        } else {
        
$src GetImageSize($source);
        
$src_type $src[2];
        
$src_w $src[0];
        
$src_h $src[1];
        }

// Determine the dimension of the new image
    
if($dest_w != "*" && $dest_h != "*") { // if both width and height are specified.
        
$new_w $dest_w;
        
$new_h $dest_h;
    }
    if(
$dest_w != "*" && $dest_h == "*") { // if width is specified but height isn't
        
$ratio $src_w $dest_w// width ratio
        
$new_w $dest_w;
        
$new_h $src_h $ratio;
    }
    if(
$dest_w == "*" && $dest_h != "*") { // if the height is specified but width isn't
        
$ratio $src_h $dest_h;
        
$new_h $dest_h;
        
$new_w $src_w $ratio;
    }
    if(
$dest_w == "*" $dest_h == "*") { // if both width and height are not specified
        
print "Bad parameter, either new width, height or both must be specified";
        return 
false;
    }

// Let's begin

   
$img ImageCreate($new_w,$new_h);
   
$src_image ImageCreateFromJpeg($source);
   
ImageCopyResized($img$src_image0,  0,  00$new_w$new_h$src_w$src_h);
   
ImageJpeg($img,$dest,$dest_q);
   
ImageDestroy($img);
   return 
true;

// function

ImageResize("images/simon/simon1.jpg","images/simon/simon1_thumbnail.jpg","*","150","100");

?>

Please don't give me **** if the problem is really small..... I'm a real newbie to PHP......Wink

Thanks.

___________________

www.selectskate.com
simon@selectskate.com

torrent

torrent

Status: Offline!

Sounds like you don't have gd extension in your php.ini file uncommented. do a search for php_gd, uncomment the line and restart your server.

___________________

Torrent
Ski-Info-Online.com
The complete ski and snowboarding information site

selectskate

selectskate

Status: Offline!

ok so there should be a file on the server that allows the script to run? :confused:

___________________

www.selectskate.com
simon@selectskate.com

lithan

lithan

Status: Offline!

if your a newbie to php ill give you some advice dont ask CDude for help he gets enjoyment out of burning newbies. sorry Cdude its true:D Nice script though i like it. and whats up with the gif thing why cant i use gif for images?

___________________

http://kazzdesign.com/images/sig.gif

epyon

epyon

16, staying Asian.
Status: Offline!
Quote:

Originally posted by lithan
and whats up with the gif thing why cant i use gif for images?

copyright crap.

___________________

http://whatpulse.bounceme.net/sig/epyon.png

lithan

lithan

Status: Offline!

liike am i not aloud to make gif thumbnails? is there an article on this i can read somewhere?

___________________

http://kazzdesign.com/images/sig.gif

CDude

CDude

nothing
Status: Offline!

compuserve = bastards

___________________

http://celerondude.com

torrent

torrent

Status: Offline!
Quote:

Originally posted by lithan
liike am i not aloud to make gif thumbnails? is there an article on this i can read somewhere?

Epyon is right! You can't use GIFs because Unisys decided to levvy a licence fee on Compuserve (Unisys developerd the compression algorithm used in gif images). This meant that Compuserve in turn decided to licence the use of GIFs. As PHP is meant to be 100% free the support for GIFs was dropped from the GD library.

___________________

Torrent
Ski-Info-Online.com
The complete ski and snowboarding information site

Page 2 out of 3
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0104 seconds.