Skip to content
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

Add transparency option to images.Overlay #9257

Closed
gytisrepecka opened this issue Dec 8, 2021 · 8 comments
Closed

Add transparency option to images.Overlay #9257

gytisrepecka opened this issue Dec 8, 2021 · 8 comments

Comments

@gytisrepecka
Copy link

Image watermarking was introduced with v0.80.0 and can be used calling Images.Overlay function. It is nice, however, to make watermark (logo that is overlayed on top of original image) less intrusive, it makes sense to set transparency (alpha channel) value like this (bottom-right logo has Alpha value 70 out of 100):

Watermarked image

I have implemented image watermarking using standard Go image library, so it would not be difficult to add Alpha setting to Images.Overlay. Default parameter could be 100 (overlayed image is not transparent at all), but when correct number specified, it could get transparent at specified rate.

Would this be something community would find useful to be added to image processing?

Related issues: #4595, #8057.

@bep
Copy link
Member

bep commented Dec 8, 2021

I would welcome such a change.

A note to others looking at this issue: The Overlay function does support Alpha channel today, so if you overlay an image with transparency, that is preserved (which I guess is good enough for most watermarking situations -- it's not hard to edit 1 image by hand).

@bep bep changed the title Image overlay with transparency (alpha) Add transparency option to images.Overlay Dec 8, 2021
@bep bep added this to the v0.91.0 milestone Dec 8, 2021
@bep bep modified the milestones: v0.91.0, v0.92.0 Dec 20, 2021
@bep bep modified the milestones: v0.92.0, v0.93.0 Jan 12, 2022
@gytisrepecka
Copy link
Author

I would welcome such a change.

A note to others looking at this issue: The Overlay function does support Alpha channel today, so if you overlay an image with transparency, that is preserved (which I guess is good enough for most watermarking situations -- it's not hard to edit 1 image by hand).

Would be cool to have an ability to set a level of transparency in shortcode parameter as bright images might look better with watermark having smaller visibility value while darker images might require 90-100% of watermark visibility.

I will make a Pull Request with this modificiation 🤓 Is it better to modify Overlay filter or create a separate one?

@bep
Copy link
Member

bep commented Jan 20, 2022

Is it better to modify Overlay filter or create a separate one?

Add an option. Call it opacity (which is what PhotoShop uses), 0-100%.

@bep bep modified the milestones: v0.93.0, v0.94.0 Mar 1, 2022
@bep bep modified the milestones: v0.94.0, v0.95.0, v0.96.0 Mar 9, 2022
@bep bep modified the milestones: v0.96.0, v0.97.0 Mar 24, 2022
@bep bep modified the milestones: v0.97.0, v0.98.0 Apr 13, 2022
@bep bep modified the milestones: v0.98.0, v0.99.0 Apr 28, 2022
@bep bep modified the milestones: v0.99.0, v0.100.0 May 24, 2022
@bep bep modified the milestones: v0.100.0, v0.101.0 May 31, 2022
@bep bep removed this from the v0.101.0 milestone Jun 16, 2022
@bep bep added this to the v0.107.0 milestone Nov 18, 2022
@bep bep modified the milestones: v0.107.0, v0.108.0 Dec 3, 2022
@bep bep modified the milestones: v0.108.0, v0.109.0 Dec 14, 2022
@bep bep modified the milestones: v0.109.0, v0.111.0, v0.110.0 Jan 26, 2023
@bep bep modified the milestones: v0.111.0, v0.112.0 Feb 15, 2023
@bep bep modified the milestones: v0.112.0, v0.113.0 Apr 15, 2023
@bep bep modified the milestones: v0.113.0, v0.115.0 Jun 13, 2023
@bep bep modified the milestones: v0.115.0, v0.116.0 Jun 30, 2023
@bep bep modified the milestones: v0.116.0, v0.117.0 Aug 1, 2023
@bep bep modified the milestones: v0.117.0, v0.118.0 Aug 30, 2023
@bep bep modified the milestones: v0.118.0, v0.119.0 Sep 15, 2023
@jmooring
Copy link
Member

Superseded by #11471

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants