I wonder if there is any graphics library that supports RGB subpixel rendering (like ClearType) for general graphics, not just for text. This would allow one to practically triple the horizontal resolution, and put graphics on third-pixel x positions.
While I think this would be very useful, I couldn't find much on the internet about it, except the following:
Is there any library that implements this, or are there efforts to bring something like this to the Cairo library, for example?
Update:
I'm referring specifically to rendering techniques that take into account that current LCD screens use sub-pixels of different colors. To make a white point, you set all sub-pixels to 'on' or 255. A white line would be several subpixels on top of each other:
...RGB...
...RGB...
...RGB...
...RGB...
...RGB...
...111...
(where .
is a fully black sub-pixel, and R
, G
or B
are fully-lit red, green, or blue sub-pixels). Because our eyes can't resolve the sub-pixels, they blend together to make a white line. I could however also make a white line from the following:
....GBR..
....GBR..
....GBR..
....GBR..
....GBR..
....111..
Note that it is perfectly sharp, but positioned at x = 1 1/3 pixels. This is not possible with traditional rendering techniques that draw a slightly blurry white line instead. Here for example R
=70% lit, r
=30% lit. I didn't work out the math, this is just so you get the idea:
...RGBrgb...
...RGBrgb...
...RGBrgb...
...RGBrgb...
...RGBrgb...
...777333...
Another example is a slope, which you can do a) with full pixels, b) antialiased, or c) with subpixel rendering:
a) RGB...... b) RGB...... c) RGB......
RGB...... RGBrgb... .GBR.....
...RGB... rgbRGB... ..BRG....
...RGB... ...RGB... ...RGB...
...RGB... ...RGBrgb ....GBR..
......RGB ...rgbRGB .....BRG.
......RGB ......RGB ......RGB
Again, note that this is just a crude example to give you the general idea, but you see that a) is jaggy or aliased, b) is blurry, and c) is as sharp as you can get it on a LCD.
Real implementations of this, for font display (ClearType on Windows and the subpixel rendering in FreeType) have a more sophisticated algorithm. They take into account that individual sub-pixels bleed or shine into each other, they preserve the total color intensity or energy. They also take into account that the subpixel spacing is not even (the spacing between R and G, or G and B (in the pixel) may be smaller than between B and R), and finally that some displays have entirely different pixel layouts.
Sub-pixel estimation is the process of estimating the value of a geometric quantity to better than pixel accuracy, even though the data was originally sampled on an integer pixel quantized space. 1 Background.
Subpixel rendering works by increasing the luminance reconstruction points of a color subpixelated screen, such as a liquid crystal display (LCD) or organic light-emitting diode (OLED) display. This thumbnail image is downsized and does not show the technique. Click to see the full-size image.
8.5. For color displays, each pixel is made up of three subpixels for red, green and blue. Each subpixel can be set to 256 different shades of its color, so it is therefore possible for a single LCD pixel to display 256 ∗ 256 ∗ 256 = 16.8 million different colors.
As far as I know no graphic library with subpixel RGB rendering exists.
Here are a few possible reasons why :
IMHO, the future of better graphics is with higher pixel density like the Apple retina display.
Someone managed to get some interesting results using ImageMagick. The method and results, as well as an interesting discussion, are exposed here: https://www.imagemagick.org/discourse-server/viewtopic.php?t=19120
Interesting subject, indeed. But the point remains: how useful can the technique be, since such process would only benefit unscaled images on a specific type of display?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With