Guest Posted January 9, 2004 Share Posted January 9, 2004 Hi There I am trying to find out if there is any way of changing the sizes of images each time you enter a new product. I am want ing sell images (photographs) on my site and need each image to be seen right. At the mnute because i can only set every picture the same, some of them look distorted. I would be grateful if any one could shed any light on how i cold get round this!!! Cheers Gail ;) Link to comment Share on other sites More sharing options...
241 Posted January 9, 2004 Share Posted January 9, 2004 In admin change the image settings to 0 that should allow images to be showing in the size you upload them No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted January 9, 2004 Share Posted January 9, 2004 Brill!! I'll try that!!! Thanks very mutch!!!!! :D :rolleyes: Link to comment Share on other sites More sharing options...
Guest Posted January 9, 2004 Share Posted January 9, 2004 :D :D :D :D :lol: Thanks Steve, Ive just altered all the image settings that require pixel sizes to 0 and hey presto. Thanks very mutch :P Gail Link to comment Share on other sites More sharing options...
radbe Posted January 24, 2004 Share Posted January 24, 2004 Is tere a way to make it proportional to the original image.. such as half the size etc... Link to comment Share on other sites More sharing options...
mmier Posted January 30, 2004 Share Posted January 30, 2004 On my site when I set the width to say 150, and the height to 0, it seemed to automatically make the image proportional. :D Miz --------------------- Contributions New Fields with Easy Populate Remove Category Images Link to comment Share on other sites More sharing options...
omegaman66 Posted January 31, 2004 Share Posted January 31, 2004 I would think you will need to make thumbnail pictures to upload that are the proper size so that the image doesn't take up the entire screen. Link to comment Share on other sites More sharing options...
medalta Posted February 7, 2004 Share Posted February 7, 2004 Thanks people, you all saved me a bunch of work Link to comment Share on other sites More sharing options...
Guest Posted March 7, 2004 Share Posted March 7, 2004 Here is an interesting question that I have not been able to get an answer to that is bascially the same as this one....with a twist of course :) I created my own thumbnails in Photoshop, set the admin controls to "0", used the thumbs for the main pics, created a seperate folder for the original size pics so when you click on "click to enlarge", but a dead image link appears. So, basically what I want is proportioned thumbs with the original sizes to pop-up when I "click to enlarge". Any ideas? Link to comment Share on other sites More sharing options...
mdem Posted March 10, 2004 Share Posted March 10, 2004 Hi folks, i`ve got problems too. I am selling posters and some are vertically formatted and some are horizontally formatted. Is there a possibility to scale them by %? Thanks Maurizio Link to comment Share on other sites More sharing options...
JeffM Posted April 9, 2004 Share Posted April 9, 2004 I've tried both setting both required image sizes to 0 like on this post, and setting width to 100 and height to 0 as in another post, and telling it to calculate image size to true. When I do either of these, the picture goes away completely. When I leave it with default settings, the pictures that are in portrait dimensions apear squashed. looking at cpanel, it looks like the osCommerce version is 2.2ms2 Any help would be appreciated. Jeff Link to comment Share on other sites More sharing options...
241 Posted April 9, 2004 Share Posted April 9, 2004 instead of 0 try making blank this will use the size that the image is uploaded No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
JeffM Posted April 9, 2004 Share Posted April 9, 2004 Thanks 241, I actually ended just going into photoshop and padding the canvas size to the proper dimensions, now it shows up in proportion and looks good. Link to comment Share on other sites More sharing options...
raybreakall Posted April 12, 2004 Share Posted April 12, 2004 I've noticed that I can put a percentage value in there also, but only for the width. I can place 50% in the width and if I put any value in the height field, the images do not show up at all. I think this is a bug with the software. Does anyone know if they are working on fixing this? Thanks, Ray Link to comment Share on other sites More sharing options...
♥ecartz Posted April 13, 2004 Share Posted April 13, 2004 I think that a percentage height is the percentage of the height of the enclosing element. Generally, the enclosing element is the same height as the image or a default of 0. Thus, you get a percentage of 0 as the height. As this is a browser property, osCommerce is not going to change it. Percentages are not officially supported. If you want to use percentages to make images a fraction of their original size, you could try the following code. Around lines 87-102 of includes/functions/html_output.php, change 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; } } to if (CONFIG_CALCULATE_IMAGE_SIZE == 'true') { if ($image_size = @getimagesize($src)) { if (substr($width, -1, 1) == '%') { $width = $image_size[0] * (substr($width, 0, -1)/100); } if (substr($height, -1, 1) == '%') { $height = $image_size[1] * (substr($height, 0, -1)/100); } if (empty($width) || empty($height)) { 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; } } Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
raybreakall Posted April 14, 2004 Share Posted April 14, 2004 That's a great tip! Thanks a bunch. I knew it was browser supported but I didn't know how the OCS software was "plugging" in those numbers. Thanks again, Ray Link to comment Share on other sites More sharing options...
raybreakall Posted April 14, 2004 Share Posted April 14, 2004 I tried that code and could not get it to work. Each time, I get a parse error about something expecting '). I have meticulously went through and tried several different things in the logic and cannot seem to get it working, even hard-coding the height and the width as $height = $height / 50 and $width = $width / 50. Any suggestions? The problem is, I could say set the width to 50 or 100 and it will make the height proportional but I have some very "thin" images that do not show up well with the small width and I have some "tall" images that are humongous with that width. Thanks, Ray :( Link to comment Share on other sites More sharing options...
raybreakall Posted April 14, 2004 Share Posted April 14, 2004 Could it be that the data type is int and not real or long or whatever? Ray Link to comment Share on other sites More sharing options...
♥ecartz Posted April 14, 2004 Share Posted April 14, 2004 Each time, I get a parse error about something expecting ').Each line should have the same number of ( as ). That's what the error says. I copied the code from a working copy, so I suspect that it is something from your edits rather than something in the posted code. Hth, Matt Always back up before making changes. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.