Guest Posted December 4, 2002 Share Posted December 4, 2002 Could someone make it work? I get only empty images :-( Pierre. Link to comment Share on other sites More sharing options...
radders Posted December 23, 2002 Share Posted December 23, 2002 Me too and that is after netpbm was installed on my server. Must be something to do with the path I guess. I'm not sure if in the contribution this refers to php path or osC path. Anyone know? Link to comment Share on other sites More sharing options...
radders Posted December 25, 2002 Share Posted December 25, 2002 /* file image_resample.php Also change html_output as in ntpbm contribution */ $file = eregi_replace( '.([a-z]{3,4})$', "-{$width}x{$height}.1", $src ); // name of resampled image $i = getimagesize( $src ); // need to know type and size $oldwidth= $i[0]; $oldheight = $i[1]; // no support for gif in recent versions if ( ($i[2] == 3) || ($i[2] ==2)) { // if this file does not exist, then make it if( !is_file( $file ) ) { $dst = DIR_FS_CATALOG . '/' . $file; // name resampled (eg. pathimage-78x88.jpg ) $im = @imagecreatetruecolor ($width, $height); // create blank thumbnail if ( $i[2] == 2) { $oldim = @ImageCreateFromJPEG ($src); // Attempt to open large image imagecopyresampled ($im, $oldim, 0, 0, 0, 0, $width, $height, $oldwidth, $oldheight); // mk thumb imagejpeg ($im , $dst , 90); // save it compressed } elseif ( $i[2] == 3) { $oldim = @ImageCreateFromPNG ($src); // Attempt to open large image imagecopyresampled ($im, $oldim, 0, 0, 0, 0, $width, $height, $oldwidth, $oldheight); // mk thumb imagepng ($im , $dst); // save it } } $src = $file; // Use the resampled image $width = $height = ""; // and it's own properties } Link to comment Share on other sites More sharing options...
radders Posted December 25, 2002 Share Posted December 25, 2002 The above post shows how I got it working but without netpbm. Simply replace the file 'image_resample.php' in the contribution with this one The other difference is of course the lack of gif support in recent versions. Let me know if you try it. hth Link to comment Share on other sites More sharing options...
Guest Posted January 29, 2003 Share Posted January 29, 2003 The above post shows how I got it working but without netpbm. Simply replace the file 'image_resample.php' in the contribution with this one The other difference is of course the lack of gif support in recent versions.Let me know if you try it. hth I seem to be having a problem getting the NetPBM contrib working even though NetPBM is installed corectly and work in other areas of our website: http://www.oscommerce.com/forums/viewtopic.php?t=32864 So I thought I would give your fix a try. After replacing your code with the current image_resample.php code when I laod my stores page as soon as the first thumbnail is called (on the left side of the page) from then on the page is totally blank. Any ideas? Link to comment Share on other sites More sharing options...
radders Posted January 29, 2003 Share Posted January 29, 2003 I tidied it up a bit and added it as a contribution - http://www.oscommerce.com/community/contri...ions,841/page,2 Was working on September snapshot but may need tweaking for later ones. Link to comment Share on other sites More sharing options...
mcbsolutions Posted May 15, 2003 Share Posted May 15, 2003 Hi radders! Will this mod work like the Netpbm one? I'm a little confused. I would like to be able to attach one file (largest size) to my products, and then have it displayed as two thumbnail sizes, small and medium. Is this what this mod does? If not, could you please post a site showing what effect this has on images. I followed the instructions to update the code for both html_output.php and image_resample.php to a T and I don't see anything happening. Probably doing something wrong. Maybe I should post the contents of image_sample.php and html_output.php? Thanks for your help! Steve Link to comment Share on other sites More sharing options...
radders Posted May 15, 2003 Share Posted May 15, 2003 Hi Steve, Yes that's how it works but the only file that needs changing is html_output.php It is rather a long file so please just PM me your file. Link to comment Share on other sites More sharing options...
Guest Posted June 23, 2003 Share Posted June 23, 2003 For those looking for NetPBM support please try using Image Resample 2. http://www.oscommerce.com/community/contributions,706 Link to comment Share on other sites More sharing options...
deltablue Posted July 27, 2003 Share Posted July 27, 2003 It works great with NetRPM but the product description lost the click to enlarge option. How do I get it back Thanks Deltablue Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.