Giter Club home page Giter Club logo

blob's People

Watchers

 avatar  avatar

blob's Issues

图片类型和使用场景

图片类型和使用场景

JPG格式

优点:

  1. 占内存小,网页加载速度快
  2. 对多色彩表现较好,适用于色彩丰富的图片

缺点:

  1. JPG格式图片是有损压缩的图片,会在压缩时降低品质。

适用场景:

  • 使用于在页面中渲染多颜色的实物图片

PNG格式

优点:

  1. 是无损压缩的图片
  2. 提供锋利的线条和边缘,做出的logo等小图标效果会更好;
  3. 更好地展示文字、颜色相近的图片
  4. 支持透明效果
  5. 图片质量高

缺点:

  1. 占内存大,会导致网页加载速度慢
  2. 对于需要高保真的较复杂的图像,PNG虽然能无损压缩,但图片文件较大

适用场景:

  • 小图标或颜色简单对比强烈的小的背景图

注:在存储图像时采用JPG还是PNG主要依据图像上的色彩层次和颜色数量进行选择。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.