没有alpha路径如何在粘贴图标时减少边缘效果
Without alpha path how to decrease edge effect while paste icon
我有一个 RGB332 LCD 和一个糟糕的 MCU 来驱动它。 MCU 没有硬件加速器,RGB332 显示器也不支持 alpha 路径。
所以我使用颜色"black"作为"alpha color"来处理图标粘贴work.Which意味着我将图标颜色数据填充到背景缓冲区,而数据不是黑色。
我遇到的问题是图标显示了它自己的抗锯齿边缘,而背景不是黑色。而 "antialiased edge" 只是从背景中产生边缘效果。
有什么办法可以处理这种情况吗?
主要问题是我没有 "Layer" 和 "Alpha" 来进行类似 PS 的合并工作。
但是图标被一个一个地粘贴到帧缓冲区。
所以我的解决方案是:
- When each icon is being pasted,I could decide the front/background,
which means I could detect the "antialiased edge" of the icons just
like I have "layers".
- After I find the antialiased edges ,I filled the pixels with the
middle color of the front/background.
- The LCD is RGB332,and the middle color calculation is just filling
the edge with 75% background color + 25% front color. If the icon
color is carefully designed, you don't even need a float calculation
.
工作可能不是那么有效,但确实解决了我的问题。
我有一个 RGB332 LCD 和一个糟糕的 MCU 来驱动它。 MCU 没有硬件加速器,RGB332 显示器也不支持 alpha 路径。
所以我使用颜色"black"作为"alpha color"来处理图标粘贴work.Which意味着我将图标颜色数据填充到背景缓冲区,而数据不是黑色。
我遇到的问题是图标显示了它自己的抗锯齿边缘,而背景不是黑色。而 "antialiased edge" 只是从背景中产生边缘效果。
有什么办法可以处理这种情况吗?
主要问题是我没有 "Layer" 和 "Alpha" 来进行类似 PS 的合并工作。
但是图标被一个一个地粘贴到帧缓冲区。
所以我的解决方案是:
- When each icon is being pasted,I could decide the front/background, which means I could detect the "antialiased edge" of the icons just like I have "layers".
- After I find the antialiased edges ,I filled the pixels with the middle color of the front/background.
- The LCD is RGB332,and the middle color calculation is just filling the edge with 75% background color + 25% front color. If the icon color is carefully designed, you don't even need a float calculation .
工作可能不是那么有效,但确实解决了我的问题。