Author Topic: Making photos and thumbnails consistent in catalog  (Read 1081 times)

0 Members and 1 Guest are viewing this topic.

zip1

  • EOS CONTRIBUTOR
  • Jr. Member
  • *
  • Offline Offline
  • Posts: 73
  • Karma: 6
    • View Profile
Re: Making photos and thumbnails consistent in catalog
« Reply #3 on: May 20, 2009, 09:23:33 AM »
Because OSC and it's clones use some very old methods to set the height and width. When both are entered into the admin it will skew the image. If the image ratio is not 1 to 1.

If you set either the height or width it acts a a maximum size in the one direction so non 1 to 1 images are not skewed.

If height and width are empty and calculate image size is set to true.  the php function getimagesize is use to set the height and width. This can actually be a bad thing to do if you server uses any php version 4.x.x. As this function in older php's is a resources hog. So if yo use anything but .2.8 or newer you can slow your site down by turning on calculate image size

The best overall all method is to create the images the size you want to display them.

Tom

David M. Graham

  • Administrator
  • Sr. Member
  • *****
  • Offline Offline
  • Posts: 380
  • Karma: 12
    • View Profile
    • osCommerce University
Re: Making photos and thumbnails consistent in catalog
« Reply #2 on: May 14, 2009, 06:05:08 PM »
One of the key factors in preserving image quality is the maintenance of what is called the "Aspect Ratio".

The aspect ratio is the relationship between the width of an image and its height.  If the height and width are the same, the aspect ratio will be 1.0 - rarely the case, but that is the ideal ratio.

Change either the height or width without changing the other "aspect" to match will change the ratio - and "skew" the image. 

When one of these aspects is left blank, the cart calculates the other aspect in a way that keeps the  aspect ratio the same.  This tends to preserve the image's appearance.

David

raven

  • Newbie
  • *
  • Offline Offline
  • Posts: 19
  • Karma: 8
    • View Profile
    • Raven and Crone
Making photos and thumbnails consistent in catalog
« Reply #1 on: May 09, 2009, 11:23:18 PM »
There are a few ways to make your photos and thumbnails all look uniform in size in your catalog.
Go to the admin, then click on configuration, then click on image, then go to small image width and click on edit and make sure the box is blank, then click update. Then go to small image height and click edit and make sure the box is blank and click update.
Here is another way to try it:
In osCommerce you can set the sizes of images to what you want. You can delete out one of the numbers. I believe it is the width you can delete -- as in leaving the box empty with nothing in it. What that does will force the image you are using to a height of 150 and regardless of square or rectangle it will automatically set the width for you. You can do that with all the image sizing elements. And it works the same in zen cart, too, for those of you that use it.