Category and Product Thumbnail Black Background

  • Posts: 6
  • Thank you received: 0
10 years 1 month ago #210210

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3

I am having a problem with the category and product thumbnails having black bars at the top and bottom of all thumbnails made by HikaShop :huh:

The original images of the thumbs shown with black bars are GIF's while the one color thumb (Valves) and the Kings Kooker image originals, are JPEG images.
See attached screen capture :dry:

Attachments:
Last edit: 10 years 1 month ago by WEBZIGHT.

Please Log in or Create an account to join the conversation.

  • Posts: 26274
  • Thank you received: 4045
  • MODERATOR
10 years 1 month ago #210212

Hi,

The HikaShop image helper extract the "background" color for the PNG and GIF images.
It allows the thumbnails to have use the transparency of the image.

		$bgcolor = $this->_getBackgroundColor($thumb, @$options['background']);
		if(in_array($extension,array('gif', 'png'))) {
			$palletSize = imagecolorstotal($img);
			if($transparentIndex >= 0 && $transparentIndex < $palletSize) {
				$trnprt_color = imagecolorsforindex($img, $transparentIndex);
				$color = imagecolorallocate($thumb, $trnprt_color['red'], $trnprt_color['green'], $trnprt_color['blue']);
				imagecolortransparent($thumb, $color);
				imagefill($thumb, 0, 0, $color);
So, I guess that your GIF images have a black background and no transparency.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 6
  • Thank you received: 0
10 years 1 month ago #210413

Actually the GIF's only background is what ever HikaShop sets when it CREATES the 100X100 thumbnails!
I never had this happen with VirtueMart using the EXACT SAME GIF's??
When I look at the ORIGINATING FILES in Photoshop they do NOT show any transparency or background!
What is really going on here???

Please Log in or Create an account to join the conversation.

  • Posts: 84305
  • Thank you received: 13700
  • MODERATOR
10 years 1 month ago #210416

Hi,

That's because VirtueMart doesn't support using the background color of the GIF images and simply set a white background all the time.
If you want to avoid that in HikaShop, a simple solution is to turn off the "force size" setting of the HikaShop configuration.
That way, no background will be necessary.

Please Log in or Create an account to join the conversation.

Time to create page: 0.063 seconds
Powered by Kunena Forum