Article introduction of Wulin.com (www.vevb.com): Optimization of serrated PNG pictures.
Let’s record a small way to process images.
This is a sprite background image. I set the background to black for easy demonstration, but it is actually a transparent background.
Before optimization, the pictures have more jagged teeth. According to the suggestion of Weimei, the solution is as follows.
Draw a rectangle of the same size (20px*19px) selection area and align it with this figure.
Reverse selection.
Delete the extra parts. It's like trimming the edges.
Finally, the image was exported to Alpha transparent PNG8 format. OK, the optimization was successful. Don't forget to compress the picture first and then use it.
By the way, let me tell you a flowchart.
This water droplet-like round shape is also quite entangled. Fortunately, the background where it is located is white, so if you cut it with a white background, you won’t worry about jagging.
Because this background image is written to position it on a 3-pixel border, the part that overlaps the border is set to transparent. Doing this without realizing it will not affect the visual effect. Ha ha.