问题标签 [srgb]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
opengl - sRGB FBO 渲染到纹理
在我的渲染器中,我在多重采样的 FBO 上生成了一个抗锯齿场景,该场景被 blitted 到一个颜色附件是纹理的 FBO。然后在渲染到帧缓冲区期间读取纹理。
我想更新它,以便获得伽马正确的结果。使用 sRGB 帧缓冲区的好处是,它允许我通过将非线性 sRGB 值直接存储在帧缓冲区中来获得更好的颜色精度。
我不确定的是我应该做哪些改变来获得这个,以及不同的设置会改变什么。
看起来扩展 ARB_framebuffer_sRGB只是处理与 sRGB 帧缓冲区的读取和混合操作。在我的情况下,我需要使用指定 sRGB 表示类型的纹理,这意味着我将使用扩展EXT_texture_sRGB ...使用线性纹理格式会禁用 sRGB 转换。
编辑:但我刚看到这个:
3) 支持 sRGB 帧缓冲区更新和混合的能力应该是帧缓冲区的一个属性吗?
已解决:是的。它应该是某些像素格式(很可能只是 RGB8 和 RGBA8)的一种功能,表明可以启用 sRGB 混合。
这允许实现简单地将现有的 RGB8 和 RGBA8 像素格式标记为支持 sRGB 混合,然后只为此类格式提供 sRGB 更新和混合功能。
现在我不太确定要为纹理的像素格式指定什么。
好的,那么渲染缓冲区呢?ARB_framebuffer_sRGB 文档没有提到任何关于渲染缓冲区的内容。是否可以使用glRenderbufferStorageMultisample
sRGB 格式,所以我可以获得启用 sRGB 存储的混合?
GL_SRGB_ALPHA
另外,指定内部格式和GL_SRGB8_ALPHA8
指定内部格式有什么区别glTexImage2D
?
java - 在 Java 中使用亮度、Lab 和 sRGB 空间制作亮度直方图
我必须创建图像的亮度直方图。我已经制作了一个 RGB 直方图
在互联网上,我发现了这些值:
亮度(标准,物镜):(0.2126*R) + (0.7152*G) + (0.0722*B)
亮度(感知选项 1):(0.299*R + 0.587*G + 0.114*B)
亮度(感知选项 2,计算速度较慢):sqrt( 0.241*R^2 + 0.691*G^2 + 0.068*B^2 )
我通过这些值制作亮度直方图,或者亮度是不同的东西?
或者,也许我使用带有方法的 java 库从 Lab 空间获取 L 值(亮度),转换 sRGB 空间?
image - 使用 Photoshop 或 Web 浏览器在同一图像上使用不同的颜色
我的一个客户是一位画家,他意识到使用 Web 浏览器 (Internet Explorer 8) 通过网站查看的图像与 Photoshop 上的相同图像之间存在色差。
他想在 Photoshop 或任何网络浏览器上获得完全相同的颜色。
图像正常保存(“另存为”而不是“保存为网络”)。(在他注意到这样做有一点改进之后)
为什么是这样?是否可以在两个应用程序上看到完全相同的颜色?可能是因为两个应用程序上的“颜色配置文件”吗?(他目前在 Photoshop 上使用 sRGB IEC61966-2.1)
谢谢。
iphone - 转换为 iPhone 的 sRGB?
如果我要为 iPhone 或 iPad 保存图像,是否应该在 Adobe Photoshop/Illustrator 中选择“转换为 sRGB”?
为什么你应该使用 sRGB说你应该在网络上使用 sRGB。但是,对于 iPhone 应用程序呢?
opengl - When to call glEnable(GL_FRAMEBUFFER_SRGB)?
I have a rendering system where I draw to an FBO with a multisampled renderbuffer, then blit it to another FBO with a texture in order to resolve the samples in order to read off the texture to perform post-processing shading while drawing to the backbuffer (FBO index 0).
Now I'd like to get some correct sRGB output... The problem is the behavior of the program is rather inconsistent between when I run it on OS X and Windows and this also changes depending on the machine: On Windows with the Intel HD 3000 it will not apply the sRGB nonlinearity but on my other machine with a Nvidia GTX 670 it does. On the Intel HD 3000 in OS X it will also apply it.
So this probably means that I'm not setting my GL_FRAMEBUFFER_SRGB
enable state at the right points in the program. However I can't seem to find any tutorials that actually tell me when I ought to enable it, they only ever mention that it's dead easy and comes at no performance cost.
I am currently not loading in any textures so I haven't had a need to deal with linearizing their colors yet.
To force the program to not simply spit back out the linear color values, what I have tried is simply comment out my glDisable(GL_FRAMEBUFFER_SRGB)
line, which effectively means this setting is enabled for the entire pipeline, and I actually redundantly force it back on every frame.
I don't know if this is correct or not. It certainly does apply a nonlinearization to the colors but I can't tell if this is getting applied twice (which would be bad). It could apply the gamma as I render to my first FBO. It could do it when I blit the first FBO to the second FBO. Why not?
I've gone so far as to take screen shots of my final frame and compare raw pixel color values to the colors I set them to in the program:
I set the input color to RGB(1,2,3) and the output is RGB(13,22,28).
That seems like quite a lot of color compression at the low end and leads me to question if the gamma is getting applied multiple times.
I have just now gone through the sRGB equation and I can verify that the conversion seems to be only applied once as linear 1/255, 2/255, and 3/255 do indeed map to sRGB 13/255, 22/255, and 28/255 using the equation 1.055*C^(1/2.4)+0.055
. Given that the expansion is so large for these low color values it really should be obvious if the sRGB color transform is getting applied more than once.
So, I still haven't determined what the right thing to do is. does glEnable(GL_FRAMEBUFFER_SRGB)
only apply to the final framebuffer values, in which case I can just set this during my GL init routine and forget about it hereafter?
opengl - OpenGL 自动 sRGB 转换与手动 sRGB 转换
我最近一直在阅读有关 sRGB 转换及其带来的一些好处的信息。我在 GPU Gems 3 中阅读了一篇非常有用的文章,该文章现在免费提供,其中涵盖了一些自动方法与手动着色器编写的方法。这是这篇文章:
https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch24.html
在什么情况下使用手动转换而不是自动转换是有益的?在我看来,使用传递给 glTexImage2D 的 GL_SRGB_EXT 和使用 GL_EXT_framebuffer_sRGB 不需要任何手动转换?
batch-file - GIMP 2: how to batch assign sRGB profile to a lot of images into various subfolder
I've an entire tree with PNG images
I need to - open - assign sRGB profile - close
to every of them
(about 2000 images)
Is there a way to do this via gimp 2?
colors - GIF:两个不同的显示器看起来 gif 很不一样
我有 2 台装有 windows 7 的电脑我有两台显示器,相同品牌,相同型号 2 台电脑使用相同的浏览器:ie8
使用第一台电脑,我看到一个网页,我们制作的所有颜色都可以
在第二台电脑中,一些 gif 看起来不同
这个 gif 有内置的 sRGB 和 GIMP 说我有索引,所以我认为这是不可能的,他们在不同的电脑上看起来不同......
我打开 Photoshop,分配 sRGB,保存,图像是相同的(SVN 告诉我没有区别)
可能是什么问题?
我不是图形专家,我是 php 程序员,但客户端有这个问题......
opengl - SDL 可以创建 sRGB OpenGL 上下文吗?
SDL 的文档似乎没有过多地提及色彩空间。我没有看到SDL_SetVideoMode
or的任何 SRGB 标志/参数SDL_GL_SetAttribute
。在 FrameBuffer 0 上写入时,SDL 是否有可能要求 OpenGL 执行颜色校正? GLUT 似乎能够提供该功能。
如果 SDL 无法做到这一点,通常的解决方法是什么?我正在考虑在GL_FRAMEBUFFER_SRGB
启用的情况下渲染到 sRGB 纹理,然后在FRAMEBUFFER_SRGB
禁用的情况下将其渲染到 FrameBuffer 0 中。有更好的主意吗?
image-processing - CMYK vs sRGB - 哪个更好
伙计们,我有两张图片,一张是 CMYK 颜色模型,另一张是 sRGB。我想知道在处理图像处理(如调整大小、裁剪、颜色填充等)时使用哪种颜色模型更好。提前谢谢大家。 !