wwfc_barmy_army Posted October 3, 2006 Share Posted October 3, 2006 Hello.I'm looking to use phpthumb (http://phpthumb.sourceforge.net/) make a thumbnail of images from a database, so i have this code:[code=php:0]<?php print "<img src=phpthumb/phpThumb.php?src=" . $qry[screenshot]. "&w=200>"; ?>[/code]And when looking at the site it shows:[code]http://localhost/rpg/phpthumb/phpThumb.php?src=images/screenshots/image.jpg&w=200[/code]But it comes up as a broken image :( The image works fine here:[code]http://localhost/rpg/images/screenshots/image.jpg[/code]Any ideas where i am going wrong?Thanks.Peter. Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/ Share on other sites More sharing options...
JasonLewis Posted October 3, 2006 Share Posted October 3, 2006 wats the code in the phpTumb.php file. that could give us some idea. Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-102974 Share on other sites More sharing options...
wwfc_barmy_army Posted October 3, 2006 Author Share Posted October 3, 2006 For some reason it's not letting us post it, if you download it from here:http://sourceforge.net/project/showfiles.php?group_id=106407&package_id=114543You can then see the code.Thanks.Peter. Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-103121 Share on other sites More sharing options...
simcoweb Posted October 4, 2006 Share Posted October 4, 2006 I'm very interested in this thread cuz i'm also looking to generate thumbnails on the fly and haven't gotten any responses to my other posts concerning this topic. I downloaded the phpThumb() files and can either post it or upload as an attachment if the forums allow.Like you, Peter, I need the <img src to produce an image from a query instead of having the name of a specific image in the <img src tag. I haven't fully set up the phpThumb yet but noticed the demo has a ton of broken links for the images. No images came in my download file. That's a red flag. Hope this isn't a waste of time. Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-103527 Share on other sites More sharing options...
wwfc_barmy_army Posted October 4, 2006 Author Share Posted October 4, 2006 I've been trying different things for a last hour but still no luck. Does anyone else have any advice about this?simcoweb, let me know if you figure anything out :)Pete. Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-103648 Share on other sites More sharing options...
wwfc_barmy_army Posted October 4, 2006 Author Share Posted October 4, 2006 Yes, after a lot of messing with it i finally got it to work. Turns out that it was looking the the wrong place so thats why it was a broken image, but after changing come code here and there i have solved it :)Pete. Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-103654 Share on other sites More sharing options...
ToonMariner Posted October 4, 2006 Share Posted October 4, 2006 The method you are adopting is for generating images that are stored directly in a database table - in a BLOB field.If the images are actually stored in a directory on your server then u don't need to use the src="ascript.php" method.....I personally use a file upload class that will create a thumbnail when the file is uploaded - Ithink it is the best way to reduce the amount of prcessing the server has to do - why create a thumbnail each time it is called? just do it once.for those intersted e-mail me and I will send you my upload class and associated code - free of charge! just give me all the glory ;) Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-103660 Share on other sites More sharing options...
simcoweb Posted October 4, 2006 Share Posted October 4, 2006 Toon, I emailed you on that offer. Let me know if you get it. Thanks! Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-103774 Share on other sites More sharing options...
simcoweb Posted October 5, 2006 Share Posted October 5, 2006 Toon, I emailed you some questions. Having a bit of a challenge getting the class file and function set up properly. The upload is failing in the final stages. Just needs some tweaking on my coding i'm sure. Link to comment https://forums.phpfreaks.com/topic/22855-php-thumbnail/#findComment-104591 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.