![]() ![]() |
Apr 19 2007, 04:02 PM
Post
#1
|
|
![]() Boss, my code's compiling (xkcd) Group: Admins Posts: 10,440 Joined: 19-September 01 Member No.: 1 ![]() |
Tested on v0.9.2. It will probably work with all other versions; if anything blows up, let me know!
Look in image_man.php for CODE $thumbnail = imagecreatetruecolor($sizemin[0],$sizemin[1]); @imagecopyresampled($thumbnail, $image, 0, 0, 0, 0, $sizemin[0], $sizemin[1], $size[0], $size[1]); //resize and resample image and replace it with CODE //start of fixed-size-background-for-thumbs mod (April 16, 2007) $thumbnail = imagecreatetruecolor($config['thumb_width'], $config['thumb_height']); imagefill($thumbnail, 0, 0, 0x000000); //change 3rd parameter if you want (e.g. 0xFFFFFF for white) @imagecopyresampled($thumbnail, $image, ($config['thumb_width']-$sizemin[0])/2, ($config['thumb_height']-$sizemin[1])/2, 0, 0, $sizemin[0], $sizemin[1], $size[0], $size[1]); //resize and resample image //end of fixed-size..lalalala...thumbs mod Add a new image to test it. You'll have to recreate your thumbs from the Admin CP to update your existing thumbs (if you've upgraded from a previous version and you get an error message during the recreation process, look at the files under the uploads directory and make sure there aren't any orphaned files. If you find any, delete them!) -------------------- ![]() ![]() Things that I don't suck at: Photography (flickr, JPG Mag), "Don't bail; the best gold is at the bottom of barrels of crap!" -Randy Pausch I have people-skills goddamnit! What is wrong with you people!!! | www.skyrill.com |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 01:39 PM |