我是靠谱客的博主 无心黑米,最近开发中收集的这篇文章主要介绍Vector graphic VS bitmap image,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

Vector graphic

  1. A vector graphic file contains a drawing list.
  2. The list contains a command for each object included in the image
  3. The objects are defined by geometrical formula and associated properties, such as line color and style.
  4. When a vector graphic need to be magnified, the file is read, the appropriate calculations are made and the objects are redrawn to a suitable scale.
  5. This means that vector graphic is scalable. The image would not get blur or distorted when magnified.

Bitmap image

  1. A bitmap image is made up of pixels (picture elements)
  2. A pixel can be imagined as a single dot.
  3. Each pixel has a color. The number of bits used to represent the color is called bit depth.
  4. The pixels of a bitmap image are organized in a matrix.
  5. The number of columns multiplied by the number of rows of the matrix is referred to as the image resolution.
  6. Bitmap images are not scalable. this means when they are over magnified, they might be blur or distorted.
  7. Estimation of the file size of a bitmap file:
    1. Calculate the number of pixels of the image. This is indicated by the image resolution
    2. Multiply the number of pixels by the bit depth to get the file size in bits
    3. Write the file size with appropriate units, MiB, GiB, etc. Special attention needs to be paid to the difference between the upper-case B(Byte, 8 bits) and lower-case b(byte).
  8. Last but not least thing is bit depth. How many bits should be used to represent the color of each pixel? It depends on the number of colors in the image. For example, if there are 256 different colors in a bitmap image, 8 bits can be used to represent the color, because 8 bits can represent 2^8=256 colors. Another example, if there are 63 colors in a bitmap, then 6 bits at least has to be used to represent all the colors. 5 bits can only represent 2^5= 32 colors, not enough. 6 bits can represent 2^6=64 colors. So, the most appropriate bit depth for a 63 colors bitmap image is 6 bits, even though 64 > 63.

最后

以上就是无心黑米为你收集整理的Vector graphic VS bitmap image的全部内容,希望文章能够帮你解决Vector graphic VS bitmap image所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(32)

评论列表共有 0 条评论

立即
投稿
返回
顶部