Jump to content

Changing brightness of an image with specific conditions?


Recommended Posts

So I have this image that I have as the background of my phone

 

f5aS4Ql.png

 

 

but the way the lock screen is made makes it so that theres a slight dark overlay over the entire screen (for legibility of screen text), seen below.

 

XeVGEaP.png

 

Based on the rgb values I've concluded that the overlay causes the image to have 70% of the original image's brightness (reproducible by filling the image with black and setting the alpha to 77 out of 255), so is there a way to alter the original such that placing the overlay over the image would make it look like the original (with if not exact, almost-exact colors)?

 

I've been trying to figure this out for hours with no luck so maybe someone else could help...

 

Link to comment
Share on other sites

Here is a quick hack at it.  (This won't be perfect, but it should get you close.*)

 

Open the original image.

Add a new black layer over the top of your original image.

Open layer properties and change opacity to 77. OK.

Select bottom layer.

 

Run the Adjustments > Brightness / Contrast effect.

Set Brightness to 39 and the Contrast to 34 (or there abouts, tinker until you're happy with the way the graphic looks). OK.

 

If you have my latest plugin pack installed, instead, run Effects > Photo > Combined Photo Adjustments effect.

Set the controls to: 0 (shadow recovery), 39, 39, 5, 0, 0, 25. OK.

 

Select the Black layer and delete it.

Save your graphic and try it.

 

*There's no quick way to do it exact.  The best way would be to do it color by color.

Click to play:
j.pngs.pngd.pnga.pngp.png
Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game

Link to comment
Share on other sites

The colors consists of RGB values. Each of the R, G, B componets is scaled by 0.7. If they're prescaled by 1/0.7, which is about 1.43, then scaling by 0.7 will result in the original color. Of course, if any color component is greater than 178 (0.7 x 255), it won't be possible to scale by 1.43, since the color component would be outside its possible range

Link to comment
Share on other sites

Here's how I believe you can achieve it without plugins:

 

Start with the sinlge-layer image.

Duplicate the layer.

Add a layer between them.

Fill the layer between them, with (109, 109, 109).

Set the between layer's Blend Mode to Multiply.

Set the upper layer's Blend to Additive.

Flatten.

 

EDIT: This is only theoretical, since the actual image contains color components of at least 189. Too high!

Link to comment
Share on other sites

Another method is to use the Texture Shader.

 

With every Texture Shader control not mentioned set to its default.

 

Copy the image to the clipboard.

Run the Texture Shader, setting:

   Image: Clipboard

  Texture Height Scale: 0

   Directional Light Intensity: 1.429

 

This has the advantage that colors that would be made too bright (that is, a component would exceed 255) are clamped in a way the preserves the hue.

 

 

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...