---
title: "Image在内存中占用的空间计算"
author: "rayloo"
date: "2007-09-29T14:22:00Z"
tags: []
slug: "image"
draft: false
lastmod: "2007-09-29T14:22:00Z"
id: 1008888
url: "https://rayloo.iteye.com/blog/1008888"
---

如果是32位，确实是Width * Height * 4  
实际上应该是Height \*(((Width * 32) + 31) \\ 32) * 4

如果是24位的化，就不一定是Width * Height * 3了，  
而是Height \*(((Width * 24) + 31) \\ 32) * 4