问题标签 [dithering]
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.
ios - 如何通过视频帧或 UIImages 数组的抖动创建 GIF(看起来更自然)?
这是链接(https://imgplay.zendesk.com/hc/en-us/articles/360029411991-What-is-GIF-Dithering-Option-),上面写着When you save the file as GIF with dithering, it can make your GIF more natural.
如何Dithering
使用Objective-C 或 Swift从 UIImages 或视频帧创建更自然的 GIF ?
google-chrome - How to disable gradient dithering in browsers?
Situation/Problem
When making a SVG filter, I stumbled upon something strange. When converting the original CSS gradient to R, G or B color only (whichever channel has the highest value), I get dithering in the gradient.
Question
While this usually is a good thing for visual performance, it now messes up the calculations/masking in my SVG <filter>
.
Is there a way to disable this dithering? Or to prevent it from occurring?
Example
Screenshot
Here you have two color wheel bars. The bottom one has the SVG filter applied to it. The filter should show full red on colors where red is the (shared) highest channel, then green, then blue. Ideally it would show 4 blocks that are, if added, have almost equal width. But as you can see, the dithering messes this up, and thus the blocks are dithered areas. For very light color gradients it's even worse.
Platform: Windows 10 - Browser: Chrome version 93.0.4577.82 (64-bit) (But happens in Edge as well.)
Notes:
- I tried adding
transform: translateZ(0)
to the element to force it to hardware acceleration, but it makes no difference. - I found a thread on adding dithering to Chromium browsers, but not sure if this has happened.
Update
As suggested by Michael, I tried using a blur before applying the rest of the filter. By adding <feGaussianBlur stdDeviation="1" in="SourceGraphic" result="blurred-img" />
to the filter and using blurred-img
instead of SourceGraphic
. But as you can see from the screenshot below, it does not disable the dithering or deals with the 'troubled' pixels.
The trouble there is that they probably have a very small positive value because of calculations, but so small that dithering kicks in instead of assuming 0 opacity.
With blur of 1 px
FYI
So although it does not really have something to do with the question, I will explain the use case a bit.
In short, this filter will be used to effect a specific range of colors of the original image based on their hue value.
In order to do that, this filter above makes a mask that will ‘select’ a certain range of colors. The result can then be put through the actual effect and then pasted over the original image. For example all red tones in an image get hue rotated.
.net - .NET 中的反向抖动
给定一个使用抖动创建的图像,如何将该图像转换回使用完整调色板?
.net 似乎没有为此目的提供任何工具。
(我知道这个映射既不是唯一的也不是无损的——我很好)
imagemagick - 如何让 ImageMagick 做这种半色调(见图片和描述)?
一直在研究 ImageMagick 的半色调功能。我尝试了许多-ordered-dither组合,但没有接近我想要的结果。我已经尝试过 Photoshop,但由于 Linux 平台和许可证等原因,这不是一个选项。
在 Photoshop 中,我通过将其设为灰度,然后通过以下选择线得到我想要的结果:图像 > 模式 > 位图和方法 使用:具有这些参数的半色调屏幕频率:22 LPI角度:55 度形状:圆形
对于这样的结果,转换命令等价物是什么?
通过单击图像 > 模式 > 位图并使用这些参数选择半色调屏幕来制作 Photoshop 半色调 频率:22 lpi 角度:55 度 形状:圆形