Transparent Backgrounds

Questions and answers about ShopSite Custom Templates

Transparent Backgrounds

Postby queenofangels » Mon Apr 29, 2013 11:43 am

I've created several .GIF images with transparent backgrounds, but when I put the product on a web page, the background is visible. Any Ideas what I might do to fix this.

Queen of Angels
queenofangels
 
Posts: 78
Joined: Tue May 24, 2011 5:36 pm

Re: Transparent Backgrounds

Postby Jim » Mon Apr 29, 2013 12:57 pm

The resize code used by ShopSite is not always able to keep the transparency on images. The best thing to do would be to create the images with the background color the same as the background color of the pages they will be displayed on. That way the image will not have a different color substituted when it is resized.

Another option is to create all the resized images outside of shopsite and upload them by ftp to the appropriate directory in the media folder of your store. Note that if you are going to use this option you should upload your full size image and have ShopSite create the resized images. Once that has been done you can upload your smaller versions of the resized images. The reason this step is necessary is because all of the parameters for an image including the size, url, attributes etc are written to a single configuration file with the name .img.<imageName>. Anytime the code calls for generating an image the value is retrieved from the configuration file. If the images are just uploaded without ShopSite having created the config file only the original sized image will be able to be output since there will not be any info for the various resized images.
Jim
Site Admin
 
Posts: 4953
Joined: Fri Aug 04, 2006 1:42 pm
Location: Utah

Re: Transparent Backgrounds

Postby queenofangels » Tue Apr 30, 2013 6:21 am

Thanks Jim,
I'll take the easy way out and use the matching background you suggested.


Thanks again,
Queen of Angels
queenofangels
 
Posts: 78
Joined: Tue May 24, 2011 5:36 pm


Return to Custom Template Questions

Who is online

Users browsing this forum: No registered users and 27 guests

cron