Kyder Keltic Posted March 10, 2006 Posted March 10, 2006 I have read where to change the images sizes and it says that I change the sizes for all my images here. The problem is that some of my images are portrait and some are landscape, and it doesn't resize them to fit rather it resizes them to the limits that I have plugged in. So an image that is 20px in height and 70px in width is changed to 100px X 70px. This is fine for some of my images that are already 100 X 70 but not 20 x 70. Is there anyway to fix this? Thanks. http://www.craftmarkgraphics.com
Guest Posted March 10, 2006 Posted March 10, 2006 you could install a thumbnailer contribution that preserves the image aspect ratio. http://www.oscommerce.com/community/contributions,2226
Kyder Keltic Posted March 13, 2006 Author Posted March 13, 2006 you could install a thumbnailer contribution that preserves the image aspect ratio.http://www.oscommerce.com/community/contributions,2226 Thanks for the help. I went there and decided on OTF2 1 2c but when I tried to replace the code in functions/html_output.php I got a fatal error. I replaced the file with the back up and everything was ok again. Then I checked it and I tried it again, but still the fatal error. It must be that I'm not replacing the code correctly in html_output.php. I'm pretty sure that I'm not understanding the note at the bottom(Note: there MAY be several instances of this function. Find the first one directly below "// The HTML image wrapper function" (w/o quotes). Replace everything starting in between there till "// The HTML form submit button wrapper function" (w/o quotes) with the code you see above.) The problem is there are two "//The HTML image wrapper function"(w/o quotes) before you see //The HTML form submit button wrapper function"(w/o quotes). Do I replace both or just the second one, or just the first one. Any help out there? Thanks
Guest Posted March 17, 2006 Posted March 17, 2006 I think the code is a little wrong. I deleted this from underneath where I pasted in the new code and got it to work... // alt is added to the img tag even if it is null to prevent browsers from outputting// the image filename as default $image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"'; if (tep_not_null($alt)) { $image .= ' title=" ' . tep_output_string($alt) . ' "'; } if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) { if ($image_size = @getimagesize($src)) { if (empty($width) && tep_not_null($height)) { $ratio = $height / $image_size[1]; $width = $image_size[0] * $ratio; } elseif (tep_not_null($width) && empty($height)) { $ratio = $width / $image_size[0]; $height = $image_size[1] * $ratio; } elseif (empty($width) && empty($height)) { $width = $image_size[0]; $height = $image_size[1]; } } elseif (IMAGE_REQUIRED == 'false') { return false; } } if (tep_not_null($width) && tep_not_null($height)) { $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"'; } if (tep_not_null($parameters)) $image .= ' ' . $parameters; $image .= '>'; return $image; } As the last } is interfearing with it. The only problem is that now I have no alt text for my images and all the image borders are black! Anyone know how to remove the borders and get alt text working?
Guest Posted March 18, 2006 Posted March 18, 2006 Can't find anything through search, no one else seems to have had this problem. Can anyone help? My site looks like a lego wall.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.