PhotoshopForums.com Home
Navigate Contact FAQ Search Members
How to create gamma correct linear gradient
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Tools and Panels
 See a User Guidelines violation? Please contact us.
Author Message

AmazingFactory

Joined: 30 Mar 2013
Posts: 5



PostPosted: Mon Apr 01, 2013 3:12 am    Post subject: How to create gamma correct linear gradient Reply with quote

If I create an sRGB 8 bpp image 256 pixels wide
and create a gradient from X = 0 (Black) to X = 255 (White)

The RGB value for the midpoint is shown as (128, 128, 128)

But for the gradient to be linear in reality (radiance) the midpoint should be (187, 187, 187)

If instead I create a linear gradient in 32 bpp mode (gamma 1.0)
and then convert to 8 bpp

It correctly sets the midpoint to (187, 187, 187)

Is there anyway to work in 8 bpp mode and have gamma corrected gradients?
View user's profile Send private message

Auieos

Joined: 29 Jan 2010
Posts: 2019



PostPosted: Mon Apr 08, 2013 11:10 pm    Post subject: Reply with quote

The gradient is the same in 8 bit and 32 bit but 8 bit is gamma encoded, while 32 bit is always gamma 1.0 (linear light).

In 8bit mode go to Edit > Convert to profile > Custom RGB > Gamma (1.0)
View user's profile Send private message

AmazingFactory

Joined: 30 Mar 2013
Posts: 5



PostPosted: Tue Apr 09, 2013 12:48 am    Post subject: Reply with quote

What I want is to work, as normal, with an 8 bit texture
but when I draw a gradient ... I can choose the gamma

Gradient with gamma has a midpoint at 187
Gradient without gamma has a midpoint at 128

In other words the code that draws the gradient should have a gamma correction option ...

Changing to Gamma (1.0 is destructive - it will damage my image.

Even in 32 bit mode it will slightly change things ...
View user's profile Send private message

Auieos

Joined: 29 Jan 2010
Posts: 2019



PostPosted: Thu Apr 11, 2013 12:36 am    Post subject: Reply with quote

There is no option to choose the gamma of a gradient.
Maybe try a workaround such as opening 2 instances of your image, one in 8 bit, one in 32, and then duplicate your 32bit gradient layers back to your 8 bit canvas. It will convert them when they transfer over and leave your 8bit image unchanged.
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    PhotoshopForums.com Forum Index -> Tools and Panels All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Contact - User Guidelines >

Copyright © 2003-2016. PhotoshopForums.com, iFroggy Network. All Rights Reserved.
Powered by phpBB © phpBB Group. phpBB SEO. Privacy Policy.
We are in no way affiliated with Adobe. Photoshop, Adobe and related marks are registered trademarks of Adobe.
PhotoshopForums.com