Paycheck Posted July 16, 2003 Share Posted July 16, 2003 HI all, I have a successfull cart running version 2.2 and I am always plagued with this small issue. WHen I use images in the catagories section of the site it always skews the images. Why can't the code be written to constrain based on one or the other dimension not to exceed a certain configured size, say 80 pixels wide or tall, but contrain the properties of that image for use in the thumbnails. Any help or direction is great as I have searched with no results pertaining to this question. THank you JM Always remember, we need patience, guidance and most of all understanding. My Contributions Link to comment Share on other sites More sharing options...
Rob Petterson Posted July 16, 2003 Share Posted July 16, 2003 Hi John, I'm pretty new to osc, but in the last couple of days I've had a look at a lot of the contributions. Maybe this one will helphttp://www.oscommerce.com/community/contri...ions,706/page,4 Rob Sometimes I think I understand everything, then I regain consciousness Link to comment Share on other sites More sharing options...
Rob Petterson Posted July 16, 2003 Share Posted July 16, 2003 Another one that's maybe worth having a look at is this one: http://www.oscommerce.com/community/contri...ions,350/page,8 Sometimes I think I understand everything, then I regain consciousness Link to comment Share on other sites More sharing options...
Quasi Posted July 16, 2003 Share Posted July 16, 2003 In my Configuration -- Images section in admin Ive got the following settings - Image width = 0 Image height = 80 Calculate image size = true For me this keeps the thumbnails from getting stretched or squashed. They will never go over 80 pixels high. One thing to look out for though is if you had a really wide image, so try not to use anything thats too wide compared to its height. Or too high compared to its width. Hope that works for you, Rob Does this smell like chloroform to you? Link to comment Share on other sites More sharing options...
Paycheck Posted July 16, 2003 Author Share Posted July 16, 2003 Wow thanks a million guys i will try this and read all the suggested post links. Thank again. JM Always remember, we need patience, guidance and most of all understanding. My Contributions Link to comment Share on other sites More sharing options...
Paycheck Posted July 16, 2003 Author Share Posted July 16, 2003 OK I uploaded image_resize.php and changed the code in the html_outpot.php file as required however now my image links are all broken. It has to do with the new code under line 71 of the html_output.php file here... They say in the install file of INSTALL img_resample You need: Linux or some other *nix download and install NetPBM and NetPBM-progs. they're on rpmfind.net gunzip and untar the img_resample.tar.gz -file (it should be in the /catalog/includes/functions folder and be named image_resample.php) open your html_output.php (in the same folder as you put resample.php) go to approx line no 73 which is something like this: //// // The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $params = '') { if ( (($src == '') || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return ''; } -AFTER- these lines you add: if ( ($width == SMALL_IMAGE_WIDTH && $height == SMALL_IMAGE_HEIGHT) || $resample ) { include DIR_FS_CATALOG . "/" . DIR_WS_FUNCTIONS . "image_resample.php"; } (three lines of code) Now it should work if your netpbm programs are installed correctly ////// The HTML image wrapper function function tep_image($src, $alt = '', $width = '', $height = '', $parameters = '') { if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) { return false; } if ( ($width == SMALL_IMAGE_WIDTH && $height == SMALL_IMAGE_HEIGHT) || $resample ) { include DIR_FS_CATALOG . "/" . DIR_WS_FUNCTIONS . "image_resample.php"; } This breaks the images link and I am a bit confused as to where I go to re-establish that link in this code. Thanks JM Always remember, we need patience, guidance and most of all understanding. My Contributions Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.