davieboy Posted January 22, 2007 Share Posted January 22, 2007 [code=php:0]$save = '/home/****/public_html/img1/thumbs/11694105066.jpg'; $file = '/home/*****/public_html/img1/11694105066.jpg'; header('Content-type: image/jpeg'); list($width, $height) = getimagesize($file) ; $modwidth = '200';$modheight = '133';$tn = imagecreatetruecolor($modwidth, $modheight) ; $image = imagecreatefromjpeg($file) ; imagecopyresampled($tn, $image, 0, 0, 0, 0, $modwidth, $modheight, $width, $height) ; imagejpeg($tn, $save, 100) ; [/code]not producing or saving any thumbs, have recked my brains outDavid Quote Link to comment https://forums.phpfreaks.com/topic/35224-thumbnail-help/ Share on other sites More sharing options...
redbullmarky Posted January 22, 2007 Share Posted January 22, 2007 any errors?try changing the last imagejpeg line to just: imagejpeg($tn); just to see if the image is being created in the first place and being output. Quote Link to comment https://forums.phpfreaks.com/topic/35224-thumbnail-help/#findComment-166338 Share on other sites More sharing options...
davieboy Posted January 22, 2007 Author Share Posted January 22, 2007 hey redbullmarky,thanks for the reply.that is working, giving me a thumbnailso i guess its saving it thats the issue?David Quote Link to comment https://forums.phpfreaks.com/topic/35224-thumbnail-help/#findComment-166348 Share on other sites More sharing options...
redbullmarky Posted January 22, 2007 Share Posted January 22, 2007 yeah. check that there are write permissions on the directory you are saving to, and if not you'll need to chmod it to allow write access. Quote Link to comment https://forums.phpfreaks.com/topic/35224-thumbnail-help/#findComment-166349 Share on other sites More sharing options...
davieboy Posted January 22, 2007 Author Share Posted January 22, 2007 its chmodded to 777david Quote Link to comment https://forums.phpfreaks.com/topic/35224-thumbnail-help/#findComment-166351 Share on other sites More sharing options...
davieboy Posted January 22, 2007 Author Share Posted January 22, 2007 u genius, its working now ?!next hard part, getting it to take the pictures from the db and creating the thumbs...David Quote Link to comment https://forums.phpfreaks.com/topic/35224-thumbnail-help/#findComment-166356 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.