Open boesbo opened 1 month ago
I'm testing this but I don't think it's the editor's fault because I see the black background already right after uploading it
at that moment I don't think the new wyswyg has nothing to do with it
I'm testing this but I don't think it's the editor's fault because I see the black background already right after uploading it
![]()
at that moment I don't think the new wyswyg has nothing to do with it
Yes, the problem is in the two files I mentioned above
same thing happening with the old editor on latest v19
same thing happening with the old editor on latest v19
![]()
Yes, by selling the history I noticed that it is something that we have been carrying with me I imagine since Magento 1.9. Do you think this is intentional behavior? It seems strange.
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 remember something from the TYPO3 days: https://stackoverflow.com/questions/18809692/why-do-imagemagick-based-thumbnail-images-of-pdf-files-in-typo3-have-black-backg https://forge.typo3.org/issues/37060
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.
Its imagemagick. Where it gets its settings tho, that I don't know. I remember something from the TYPO3 days: https://stackoverflow.com/questions/18809692/why-do-imagemagick-based-thumbnail-images-of-pdf-files-in-typo3-have-black-backg https://forge.typo3.org/issues/37060
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:
$image = Varien_Image_Adapter::factory('GD2');
Well this perhaps then https://stackoverflow.com/questions/5913284/php-gd-transparent-areas-goes-black
(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