Advertisement:

Author Topic: Thumbnails have image  (Read 802 times)

Adyyda

  • Sr. Member
  • ****
  • Posts: 435
Thumbnails have image
« on: April 27, 2015, 01:10:36 pm »
Hello. I do some customisation on item page and i have noticed one thing. Even if i set up in admin area the image sizes to be exactly as they are from the windows pictures images, the thumbnails have white (i have placed a black background to demonstrate the issue).
 As you can see the main image doesn't have it, confirming that the settings are ok. I tried all sorts of css settings in vain just to realize that the white is added somehow when the thumbnails are generated. Has anyone noticed this issue and has a fix for it? Thanks

dev101

  • Osclass Hero
  • Hero Member
  • *
  • Posts: 2155
  • osclass.work
Re: Thumbnails have image
« Reply #1 on: April 27, 2015, 02:27:17 pm »
What are your settings for image size, preview and thumbnails? What are your image size original dimensions?

Background is added at image processing and generation class (ImageResizer.php) to maintain proper aspect ratio. Some color must be added in jpeg since it does not support alpha channel, and white is universal/standard. You may modify many things regarding images if you are familiar with GD and/or iMagick. This is a low-level core file with no way to modify it externally. Option to force aspect is present, which will not add this "space" but squeeze or expand images instead to fit your dimension settings [bad idea].