search

Home  >  Q&A  >  body text

javascript - How is this sprite image generated?

https://s1.hdslb.com/bfs/stat...

Much smaller than ordinary pictures. Size 1600*2444 but only 70kb? Reduced quality?
During development, was this typesetting done manually one by one? Or generated by i tool

曾经蜡笔没有小新曾经蜡笔没有小新2697 days ago895

reply all(5)I'll reply

  • 天蓬老师

    天蓬老师2017-06-26 10:58:32

    This picture is an 8bit png (maximum 256 colors). For pictures with simple colors, you can use this format to reduce the size.

    reply
    0
  • 迷茫

    迷茫2017-06-26 10:58:32

    There are tools, /a/11...

    Image compression can be done with gulp-imagemin. This makes it easy to integrate the project into your workflow.

    It seems that there are relatively few people using sprite images now, and they are gradually using svg and icon font instead.

    reply
    0
  • 阿神

    阿神2017-06-26 10:58:32

    Usually relies on tools. I usually use CssSprite.exe. I just drag the image in and it will generate a sprite image and the corresponding css for you

    reply
    0
  • 淡淡烟草味

    淡淡烟草味2017-06-26 10:58:32

    CssSprite.exe also needs to be dragged in manually

    reply
    0
  • 扔个三星炸死你

    扔个三星炸死你2017-06-26 10:58:32

    You can use image editing software such as Photoshop to put multiple pictures on the same layer and export them, or use automated construction tools to automatically stitch the merged pictures

    reply
    0
  • Cancelreply