Vote count:
0
Right now I am using System.Drawing.Bitmap to take an image and divide it into regions. I assume that Bitmap must decompress the image in order to perform operations on it.
However, the Bitmap class accepts these formats: BMP, GIF, EXIF, JPG, PNG and TIFF
Some of these formats are compressed, so if the data in the stream is compressed, doesn't it have to be decompressed to perform manipulations? If so, does that mean that the Bitmap class allocates more memory for the decompressed version of the stream?
My program seems to use less memory when i pass the Bitmap constructor a PNG stream instead of a BMP stream. However, I am wondering if this will later use more memory. Won't the PNG stream need to be decompressed to another memory location in order to perform image operations on the bitmap?
Aucun commentaire:
Enregistrer un commentaire