magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.52k stars 9.31k forks source link

White area in watermark displays as black #37986

Open nahall opened 1 year ago

nahall commented 1 year ago

Preconditions and environment

Tested with Magento 2.4.3 and 2.4.6

Steps to reproduce

Create a watermark PNG that has a transparent background and a section that is white.

Below is a sample watermark file that I created. In this file I used a transparent background and created 2 "white" rectangles -- the upper left one is pure white, HTML #ffffff, but the lower right rectangle is slightly off-white, HTML #fefefe. To the eye both look white. NOTE that in the white background of github it looks like nothing is here, go over the whitespace below and you'll see the link to the watermark image.

watermark-test

Now go to Magento Config->Content->Design Configuration. Edit Global and upload the watermark PNG image. Set opacity to 50 and image size to 100x100, center. Save the settings.

Now load a product page.

You'll see the product page with the watermark overlaid. The upper left corner rectangle that was pure white in the watermark file will actually display as black, not white, where as the slightly off-white rectangle will display as white, as expected.

Expected result

Both the pure white rectangle and the slightly off-white rectangle should appear white in the watermark.

Actual result

The pure white rectangle displays as it would if black were used in the watermark, instead of white.

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 year ago

Hi @nahall. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

nahall commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @nahall. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @nahall, here is your Magento Instance: https://3831be7cc17474552c27cc81a7c2583f.instances-prod.magento-community.engineering Admin access: https://3831be7cc17474552c27cc81a7c2583f.instances-prod.magento-community.engineering/admin_509a Login: c5f1377b Password: 78f8d42729d7

nahall commented 1 year ago

Confirmed that this still happens with the vanilla dev instance provided. See the below image from the dev instance, the black square on the watermark should appear white:

mb02-gray-0

m2-assistant[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 1 year ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 year ago

Hi @engcom-Bravo, here is your Magento Instance: https://3831be7cc17474552c27cc81a7c2583f.instances-prod.magento-community.engineering Admin access: https://3831be7cc17474552c27cc81a7c2583f.instances-prod.magento-community.engineering/admin_5959 Login: 2ef187c6 Password: c0df691c8fe0

engcom-Bravo commented 1 year ago

Hi @nahall,

Thank you for reporting and collaboration.

Verified the issue on Magento 2.4-develop instance and the issue is reproducible. Kindly refer the screenshots.

Steps to reproduce

Screenshot 2023-09-13 at 12 54 20 PM Screenshot 2023-09-13 at 12 55 00 PM Screenshot 2023-09-13 at 12 54 33 PM

The Pure rectangle displaying as a Black instead of white and other diaplaying as white.

Hence Confirming the issue.

Thanks.

github-jira-sync-bot commented 1 year ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-9550 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 year ago

:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

mtjweb commented 5 months ago

I had the same problem with smaller images. I was able to solve this by using images with a minimum resolution of 1000x1000px.