Search the Community
Showing results for tags 'srgb'.
-
Hi everybody, I have already posted this question on the SideFX Technical Discussion forum but had no luck so far. Maybe someone here could help me? I am trying to get raw color values from an RGBA .png file with the vex function rawcolormap() but it appears that I can only get pre-multiplied values. When using .tif, color values appear to be correct. I am loading the the image as linear even though it is in gamma 2.2 to prevent gamma conversion. Here is my vex code: vector4 rgba = rawcolormap(chs("texture_map"), U, V, "srccolorspace", "linear"); v@Cd.x = rgba.r; v@Cd.y = rgba.g; v@Cd.z = rgba.b; @Alpha = rgba.a; For testing I have created a simple test image where all color channels have a value of 1.0 and the alpha channel has a gradient from 0 to 1. Please see attached image. Opening the image in Photoshop and Gimp shows unpremultiplied color channels. When using above VEX code, color channels are premultiplied against the alpha channel. And opening the image in Mplay, results are even more confusing. Pixel inspection here shows values that I can only recreate by opening the image (which is in gamma 2.2) defined as linear and then applying a second gamma conversion from linear to sRGB. Does anybody know why this is and how to work around this problem? Thanks to anyone taking an interest. Cheers
- 1 reply
-
- colormap
- rawcolormap
- (and 5 more)