473,411 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Compressed Bitmap

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
Oct 27 '07 #1
3 3917
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()

"Samuel" wrote:
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
Oct 30 '07 #2
Thank you for that
"chad" <ch**@discussions.microsoft.comwrote in message
news:6F**********************************@microsof t.com...
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()

"Samuel" wrote:
>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

Oct 30 '07 #3
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
"chad" <ch**@discussions.microsoft.comwrote in message
news:6F**********************************@microsof t.com...
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()

"Samuel" wrote:
>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

Oct 30 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Keith Bowes | last post by:
I have a script for requesting HTTP resources and I want it to use HTTP compression (to reduce bandwidth), if possible. What's the best way to do this? I've tried using zlib functions but they...
8
by: Dennis Hotson | last post by:
Hi, I'm trying to write a function that adds a file-like-object to a compressed tarfile... eg ".tar.gz" or ".tar.bz2" I've had a look at the tarfile module but the append mode doesn't support...
4
by: Pavel | last post by:
Hello. I am trying to make a folder compressed and failing miserably. Below are three ways that I tried to make it compressed, all of them compile and run w/o any problems, but the folder is...
1
by: JSheble | last post by:
I need to save a bitmap object as a G4 Compressed TIF file... any help would be tremendously appreciated...
3
by: Tom | last post by:
I am loading a TIF file into a bitmap stream (Dim bmp as new bitmap etc etc). I use GDI+ to draw some text onto the lower left corner of the TIF, then save the image (i.e. bmp.Save(filename))....
3
by: Tim Frawley | last post by:
I am using a method that was described as the best for avoiding memory leaks when using MS Picture boxes. The main idea was to use a variable to load the image from file and then assign the...
8
by: robert | last post by:
Hello, I want to put (incrementally) changed/new files from a big file tree "directly,compressed and password-only-encrypted" to a remote backup server incrementally via FTP,SFTP or DAV.... At...
1
by: davidpryce123 | last post by:
Dear Group. For an application I am developing I need to display a 64 bit bitmap as a compressed ascii string of bits. This is to allow for the easier understanding of the bits for the users....
1
by: sedwick | last post by:
I'm using .NET 2.0.50727 in VS 2005 Pro, ENU Service Pack 1 (KB926601). I've been experimenting with the System.IO.Compression classes GZipStream and DeflateStream, and I found it interesting to...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.