Compressed Bitmap

  • Thread starter Thread starter Samuel
  • Start date Start date
S

Samuel

I need to read a tiff Image and change it slightly.

Currently I create a bitmap then I draw the original image and do the
changes.

Since the tiff is very large in size the bitmap takes a huge amount of
memory

Is there anyway to create a bitmap and keep the image compressed?

Thank you in advance
Samuel
 
there is no such thing as a "compressed bitmap". Bitmaps are inherently
uncompressed. Therefore, when you are reading the tiff image into a bitmap
that you created, eg...

dim btmap as new bitmap("yourfile.tiff")
you are actually creating a bitmap with 4 channels ARGB.

You can't compress the btmp in memory. You can, however, save the channels
into an array, and if you ignore the A channel, you can reduce the memory
footprint.

If you want to compress the output file, you can save the bitmap as jpg,
like btmap.save()
 
Thank you for that


chad said:
there is no such thing as a "compressed bitmap". Bitmaps are inherently
uncompressed. Therefore, when you are reading the tiff image into a bitmap
that you created, eg...

dim btmap as new bitmap("yourfile.tiff")
you are actually creating a bitmap with 4 channels ARGB.

You can't compress the btmp in memory. You can, however, save the channels
into an array, and if you ignore the A channel, you can reduce the memory
footprint.

If you want to compress the output file, you can save the bitmap as jpg,
like btmap.save()
 
Back
Top