Post by granddaddy » Thu Sep 18, 2014 3:21 pm

When you upload an image it immediately creates a thumbnail file so it can show it in the file selector. I'm talking about the next step where you select that image to add it to a product or description.
If you are going to add that image as a product picture (on the Data tab in the product editor) it will create further thumbnails. But in the Description field you can also add any images you want using the small button on the editor toolbar. In the latter case, opencart does not create thumbnails - it uses the original file that was uploaded.
It's a simple way to check if there's a fault in your original files, or whether it's a problem with thumbnail creation.
Yes, when you upload it you are seeing a black background - but if you then insert that into a description field it should show with correct transparency.

Active Member

Posts

Joined
Sat Feb 18, 2012 5:48 pm

Post by timmyi23 » Thu Sep 18, 2014 4:39 pm

Thanks for you help with this. Yes it must be a fault with thumbnail creation as when inserted as you suggested it does indeed show as a proper png with transparent background.

New member

Posts

Joined
Wed Nov 27, 2013 10:14 pm

Post by granddaddy » Thu Sep 18, 2014 5:52 pm

If you can live with the fact that the filemanager thumbnails show black, but the inserted image looks correct, then it won't be a problem.
But if you use transparent png's for product images you're likely to get problems. In that case all I can suggest is NOT using transparent images for products.
Oddly enough, I can't duplicate the problem on my opencart. I am using version 1.5.1.3 which is quite old, but I tested transparent png's and they keep their transparency fine for me even as re-sized thumbnails.

Active Member

Posts

Joined
Sat Feb 18, 2012 5:48 pm

Post by Dhaupin » Fri Sep 19, 2014 4:21 am

Tried your test image and it worked fine, no black background.

What version of PHP are you using top run the store? GDI could be really old and not rendering right or something

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by timmyi23 » Fri Sep 19, 2014 5:51 am

How do I check this?

New member

Posts

Joined
Wed Nov 27, 2013 10:14 pm

Post by Dhaupin » Fri Sep 19, 2014 6:21 am

It will be in the sidebar of your server cpanel. You can also use a php info file like this guide http://kb.mediatemple.net/questions/764 ... page%3F#gs

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by timmyi23 » Fri Sep 19, 2014 7:18 am

Hi mate,

PHP version is 5.4

New member

Posts

Joined
Wed Nov 27, 2013 10:14 pm

Post by Dhaupin » Fri Sep 19, 2014 9:48 am

Thank you man, 5.4 is a good version. It should run GDI fine with recent Opencart. GDI is what PHP uses to manipulate images. Sometimes you can use ImageMagik too, its similar to GDI. That was my only real angle on this, it sounded like the OC image engine was hanging from older PHP->GDI...but some more thoughts:

-- Have you tried this with a transparent GIF image? Try converting a transparent PNG to transparent GIF and uploading. The difference is that PNG has an extra channel "alpha" for these transparencies, GIF is simplistic.

-- Also have you tried clearing the image from image/cache/ to see if it regenerates PNG back normally? If it can re-generate on its own it may hint towards uploader(function) issue, perhaps cause of a mod somewhere

https://creadev.org | support@creadev.org - Opencart Extensions, Integrations, & Development. Made in the USA.


User avatar
Active Member

Posts

Joined
Tue May 13, 2014 3:45 am
Location - PA

Post by timmyi23 » Fri Sep 19, 2014 5:21 pm

Thanks mate, I will give these a try.

New member

Posts

Joined
Wed Nov 27, 2013 10:14 pm

Post by VanioBoy » Mon Jun 28, 2021 10:42 pm

Hi, I saw that the topic is old, but I have the same problem.
Has anyone solved the black background problem?

New member

Posts

Joined
Wed Nov 09, 2016 5:52 pm

Who is online

Users browsing this forum: Semrush [Bot] and 90 guests