sujitseth
June 30th, 2004, 09:28 AM
HI, i have an idea on how to compress a bitmap but i'm unable to come up with a code for it...it would be of great help if someone could tell me how to go abt it
The ideais as belowthis is the project question,
in a bitmap file information is stored for each pixel on the screen...The depth of the bitmap suggests the umber of bits representing the pixel(for eg.24bit).
Now i need to generate a program where
1)
incase the bit pattern is being repeated again for the next pixel then it wil represent the whole pattern as a 0...every time the patten changes a 1shall be added to the new pattern
for eg if we consider a bitmap having depth of 8bit
then suppose
the data for 2 consecutive pixels is
111000000 11100000
so it shall be represented after the execution of the program as
111100000 0
where the 1 in the first bit pattern indicates the start of of another bit pattern
2)
i've already developed a program that compresses the coding tree that has a high no of zeroes but in case there are more no of 1s than zeroes then the coding tree shall expand so for that i need to develop a algorithm that complements the bit sequence where no of sequence of 1s is high and shall add a bit 1 prior to the sequnce suggesting that the sequence is complemented
for eg
for a bitmap of depth 8bits
a pixel is represented as
11111110 then it should be
1000000001 after execution of the program
where the one sugests that the sequence has been complemented if it is not complemented then there wold be a zero instead of the 1
i need to develop a program to reverse the codes in both the cases too
I looked in many books and spoke to many institutions but nobody is able to help
See if u can do anything abt it
The ideais as belowthis is the project question,
in a bitmap file information is stored for each pixel on the screen...The depth of the bitmap suggests the umber of bits representing the pixel(for eg.24bit).
Now i need to generate a program where
1)
incase the bit pattern is being repeated again for the next pixel then it wil represent the whole pattern as a 0...every time the patten changes a 1shall be added to the new pattern
for eg if we consider a bitmap having depth of 8bit
then suppose
the data for 2 consecutive pixels is
111000000 11100000
so it shall be represented after the execution of the program as
111100000 0
where the 1 in the first bit pattern indicates the start of of another bit pattern
2)
i've already developed a program that compresses the coding tree that has a high no of zeroes but in case there are more no of 1s than zeroes then the coding tree shall expand so for that i need to develop a algorithm that complements the bit sequence where no of sequence of 1s is high and shall add a bit 1 prior to the sequnce suggesting that the sequence is complemented
for eg
for a bitmap of depth 8bits
a pixel is represented as
11111110 then it should be
1000000001 after execution of the program
where the one sugests that the sequence has been complemented if it is not complemented then there wold be a zero instead of the 1
i need to develop a program to reverse the codes in both the cases too
I looked in many books and spoke to many institutions but nobody is able to help
See if u can do anything abt it