In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1 preface
The boundary of anti-aliasing image rendered by AGG always seems to be blurred. After research, it is due to the use of sub-pixel precision anti-aliasing, the boundary will be blurred by half a pixel. Causes the same color problem on the boundaries where multiple images overlap. As the author said, do not think that the use of AGG can solve all problems, the so-called virtue rises ten, as vice rises one foot. Any design is a compromise, and the problem can only be solved in an evasive way. Continued attention will be paid to the limitations of AGG in the future.
2 the boundary coloring problem of overlapping areas 1 code display
Void TestBlackBorden ()
{
Agg::rendering_buffer & rbuf = rbuf_window ()
Agg::pixfmt_bgr24 pixf (rbuf)
Typedef agg::renderer_base renderer_base_type
Renderer_base_type renb (pixf)
Typedef agg::renderer_scanline_aa_solidrenderder_scanline_type
Renderder_scanline_type rensl (renb)
Agg::rasterizer_scanline_aa ras
Agg::scanline_u8 sl
Ras.reset ()
Ras.add_path (agg::ellipse (100150100100))
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (255j0pl 0))
Ras.add_path (agg::ellipse (200100100100))
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (0555))
Ras.add_path (agg::ellipse (200200100100))
Agg::render_scanlines_aa_solid (ras,sl,renb,agg::rgba8 (0Pol 0255))
}
2 problem description
Three solid circles form three rings, and each circle has overlapping parts, and you can see that there is a black arc on the overlapping boundary.
According to normal logic, the boundary is either red, blue, or green. There is actually a mixed color, and the anti-aliasing effect uses a mixed color to alpha-blending the underlying color with the overlaid color, which will actually show the mixed color.
The following is the author's description:
I only flipped your p_w_picpath horizontally. Itshows how the colortriplets are
Placed and explains this effect. But youare right, these "black borders"
Will be seen on any device. To get rid ofthem you need to use gamma
Correction. Seeexamples/gamma_correction.cpp.
According to the author's idea to set up gamma, of course, do not rule out setting errors, do not understand the example of gamma_correction.
The developer responded:
For my display a gamma of 2.5 looks good. Ithink I will add someuser
Defined gamma option to my application. Bytime i will have to delve
Into this topic more deeply.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.