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()
> I need to read a tiff Image and change it slightly.
>
[quoted text clipped - 8 lines]
> Thank you in advance
> Samuel
Samuel - 30 Oct 2007 14:03 GMT
Thank you for that
> there is no such thing as a "compressed bitmap". Bitmaps are inherently
> uncompressed. Therefore, when you are reading the tiff image into a bitmap
[quoted text clipped - 22 lines]
>> Thank you in advance
>> Samuel
Mindgeek - 30 Oct 2007 19:51 GMT
> there is no such thing as a "compressed bitmap".
Sure there is. Bitmaps can use RLE (Run-Length Encoding) for compression.
http://www.fileformat.info/mirror/egff/ch09_03.htm
> there is no such thing as a "compressed bitmap". Bitmaps are inherently
> uncompressed. Therefore, when you are reading the tiff image into a bitmap
[quoted text clipped - 22 lines]
>> Thank you in advance
>> Samuel