Ik heb gezocht op tweakers en vond de onderstaande code
nu resized dit scriptje wel maar niet helemaal zoals het hoort
hij maakt van
http://irc.fearnet.nl/test/FearLess/auto-19.jpg
dit
http://irc.fearnet.nl/test/FearLess/thumbs/auto-19.jpg
wat doe ik nu fout?
PHP:
1
| <? define('C_JPEG_QUALITY', 70); function thumb($src) { if (isSet($src) &amp;amp;&amp;amp; file_exists($src)){ $thumbname = '_thumb-'.$src; if (!file_exists($thumbname)) { $srcimg = ImageCreateFromJPEG($src); $newy = 300; $sx = ImageSX($srcimg); $sy = ImageSY($srcimg); $newx = $sx * ($newy / $sy); $destimg = ImageCreate($newx, $newy); ImageCopyResized($destimg, $srcimg, 0,0,0,0, $newx, $newy, ImageSX($srcimg), ImageSY($srcimg)); ImageDestroy($srcimg); ImageJPEG($destimg, $thumbname, C_JPEG_QUALITY); } return $thumbname; } }?> |
nu resized dit scriptje wel maar niet helemaal zoals het hoort
hij maakt van
http://irc.fearnet.nl/test/FearLess/auto-19.jpg
dit
http://irc.fearnet.nl/test/FearLess/thumbs/auto-19.jpg
wat doe ik nu fout?
specs : http://specs.tweak.to/7435