Skip to content

Instantly share code, notes, and snippets.

@re-imagined
Last active April 5, 2016 05:13
Show Gist options
  • Save re-imagined/bd646354ee186a57b020 to your computer and use it in GitHub Desktop.
Save re-imagined/bd646354ee186a57b020 to your computer and use it in GitHub Desktop.
一张1024×640分辨率的图片,假定每个像素用16位色彩表示,用位图文件(bitmap)格式存储,则这张图片文件需要占用多大的存储空间

###图片像素×位深度÷8=位图大小(字节) ####例如 16位色彩 #####每个像素占16bit #####1024 * 640 * 16 = 10485760 bit #####10485760 / 8 = 1310720 byte #####1310720 / 1024 = 1280 kb

#####注: #####1位,(单色);4位:(16色);8位(256色); #####16(64K色,高彩色);24(16M色,真彩色);32(4096M色,增强型真彩色)。  

  • 1Byte=8bit 1Kb=1024Byte 1Mb=1024KB
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment