-
-
Notifications
You must be signed in to change notification settings - Fork 436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Black background of PNG images with transparent background in the Wysiwyg editor #3998
Comments
mmmm I really don't know :-\ all images are always re-saved in order to remove any possible form of "virus" within the image, but to remove transparency I've no idea why |
Its imagemagick. Where it gets its settings tho, that I don't know. I dont know if that setting is available to customize from within magento, or if its only sitting in some php.ini file. I know too little about this. |
That part of the script uses the GD library not ImageMagick: |
Well this perhaps then (im checking out here, im just googleing stuff anyway) |
Yes, this is it. In the two files I wrote at the beginning, transparency management is missing. But it's so obvious that it makes me doubt. It doesn't seem like an oversight. I can also act by creating a PR, but first I want to better understand if this behavior has a purpose, since it is only visible in the editor. |
Well, all this system comes from a time where it wasnt the norm and browsers had troubles with transparent files? I think up to IE11 no IE browser learned to do it or something? So it could be very well just that. :D |
In the next few days I will propose a patch. I am very clear on the problem. Transparency is simply not managed in the two phases: 1. thumb creation, 2. editor preview url |
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
$image->keepTransparency(true);
to line386
of the fileapp/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php
app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php
Action:directiveAction()
. I still haven't found a way to solve it.I attach images of my GD version.
Thumb
app/code/core/Mage/Cms/Model/Wysiwyg/Images/Storage.php::resizeFile
Preview in editor
app/code/core/Mage/Adminhtml/controllers/Cms/WysiwygController.php::directiveAction
The text was updated successfully, but these errors were encountered: