View Issue Details

IDProjectCategoryView StatusLast Update
0003194OXID eShop (all versions)4.11. Image handlingpublic2018-01-29 14:18
Reportertjungcl 
PriorityhighSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product VersionPast development 
Target VersionFixed in Version6.0.1 
Summary0003194: transparent gif looses transparency when generated to different size
Descriptionas in https://bugs.oxid-esales.com/view.php?id=970 the same happens with gifs.

After upload via backend, the master image is still transparent, while all generated versions have a black background instead.

I tried a transparent gif as manufacturer-logo.
TagsImage Conversion
ThemeNot defined
BrowserAll
PHP VersionNot defined
Database VersionNot defined

Relationships

related to 0000970 resolvedarvydas_vapsva Transparent PNG pictures will lose their transperency 
related to 0003318 resolvedSven Brunk png scaling: resize used instead of resample 
related to 0003642 closedSven Brunk bug in php causes imagecopyresampled to produce artifacts in images 
related to 0005576 resolvedLinas Kukulskis Generated GIFs results in poor quality when being resized 

Activities

birute_meilutyte

2011-08-31 14:58

reporter   ~0005158

Reminder sent to: tjungcl

Hello,

sorry, but i can not reproduce the case. Do you still experience the same problem in our latest nightly build (fresh install)? If so, could you please attach this gif image to this bug report?


greetings,

tjungcl

2011-09-01 09:49

reporter   ~0005164

Last edited: 2011-09-01 09:50

View 3 revisions

I wont do a fresh install of the latest nightly build to verify.

However I tested again in rev 38439 since when no modifications where done to oxdynimggenerator.php

Its important, that the master gif has a different resolution than the generated image will have.

I attached the gif with which i had the problem

tjungcl

2011-09-01 09:49

reporter  

trans.gif (706 bytes)
trans.gif (706 bytes)

dainius.bigelis

2012-04-13 09:09

reporter   ~0006266

@Developers: please check discussion in forums:
http://www.phpfreaks.com/forums/index.php?topic=302542.0
http://mediumexposure.com/smart-image-resizing-while-preserving-transparency-php-and-gd-library/

and probably need to check the new version of library as described. Might solve the problem.

rimvydas_paskevicius

2012-04-20 16:24

reporter   ~0006378

Tried upload your attached gif and another one - all works fine. Gif's are resides and transparency is not corrupted. Maybe it depends on GD libary version.

For testing used:

GD Version: 2.0.34
libPNG Version: 1.2.42

tjungcl

2012-04-23 10:43

reporter   ~0006398

I reproduce it in your own demoshop.
See screenshot

tjungcl

2012-04-23 10:43

reporter  

trans2.PNG (260,073 bytes)
trans2.PNG (260,073 bytes)

leofonic

2013-03-06 13:59

reporter   ~0008479

Gif resize Quality is probably bad because oxpicgenerator.php resizeGif uses imagecreate instead of imagecreatetruecolor. From http://www.php.net/manual/en/function.imagecopyresampled.php :
Note:

There is a problem due to palette image limitations (255+1 colors). Resampling or filtering an image commonly needs more colors than 255, a kind of approximation is used to calculate the new resampled pixel and its color. With a palette image we try to allocate a new color, if that failed, we choose the closest (in theory) computed color. This is not always the closest visual color. That may produce a weird result, like blank (or visually blank) images. To skip this problem, please use a truecolor image as a destination image, such as one created by imagecreatetruecolor().