Solved

Image decompression algorithm

Posted on 2009-05-11
13
879 Views
Last Modified: 2013-12-18
Hi All
  i want to know about the image decompression algorithm used in lotus notes to  decompress bitmap images.

Thanks in Advance
0
Comment
Question by:davinder101
  • 6
  • 4
  • 3
13 Comments
 
LVL 22

Expert Comment

by:mbonaci
ID: 24353591
What do you want to do? Specify details...
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 24353601
I ask because bitmap images are not compressed.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 24355819
@davinder101

Do you mean compress when you write decompress?
0
 

Author Comment

by:davinder101
ID: 24361209
I am developing a application in c++ to extract images from lotus notes .
in lotus notes jpeg and wmf files are not compressed but bitmaps are compressed.
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 24362509
Maybe this can help you (download attachment at the bottom of the page - I don't have access):
http://www.eview.com/eview/VOLR6.nsf/0/60E10C63F2E130328525738B00709D51

And this (this is how to add inline image to RTF - not attachment, see if you can do it other way around):
http://www.eview.com/eview/volr6.nsf/2a8bf6b62c61b60585256f2500684630/70c45a215c02c48185257091005aae79?OpenDocument

Hope this helps,
Mb¤
0
 
LVL 45

Expert Comment

by:aikimark
ID: 24363068
Lotus Notes has an API that gives you access to most of the items (views, documents, etc.).  Don't worry about decompressing the image, since the API should present your program with a regular bitmap.

On systems where Notes is installed, you will find at least one ActiveX object that wraps the Notes APIs.  This will likely be the easiest solution path for you to code.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 22

Expert Comment

by:mbonaci
ID: 24364659
Yes, but Lotus Notes doesn't have rich text field inline image manipulation implemented, so, IMHO your only option is to try to utilize examples I posted...
0
 

Author Comment

by:davinder101
ID: 24373756
but i need information about the decompression Algorithm
0
 
LVL 45

Expert Comment

by:aikimark
ID: 24376228
Are you sure these are compressed bitmap images and not some other format?

I've been doing some searching on the RTF format, since my prior RTF work did not include embedded images.  I might have found some of the different compression methods on the Microsoft site.  see snippet

If you can't use a Notes Document object to present you with the image, I recommend that you consider using an image library or RTF rendering object to  do this image manipulation.

If you insist on coding this yourself and know that these are compressed bitmap images, you are probably looking at RLE4 or RLE8 compression schemes.  One of the big reasons why bitmap files typically compress so well is that they contain identically colored pixels in adjacent positions.  Lempel-Zev-Huffman algorithm renders these 'runs' into much smaller representations, much the same as RLE (Run Length Encoding)



RLE4 compression

RLE8 compression

Group 3 compression

Group 4 compression

JPEG compression.

JBIG compression.

JPEG 2000 compression.

PNG compression.

Open in new window

0
 

Author Comment

by:davinder101
ID: 24381708
I am using NotesPeek, a utility that allows navigation and display of the complete contents of Lotus Notes database files. It breaks out the database components in a tree structure.

plz find the attached snap of notespeek which gives information about the compressed bitmap image.

Thanks
New-Picture.bmp
0
 
LVL 45

Expert Comment

by:aikimark
ID: 24383188
clearly, this is a WMF encoding.  WMF employs RLE.

"...NotesPeek shows a Windows Metafile Segment and the caption text is in there. In the C API, this is a CDWINMETASEG record."
From:
http://www-10.lotus.com/ldd/46dom.nsf/55c38d716d632d9b8525689b005ba1c0/39cd664bbb96e2be80256dea00614ec2?OpenDocument

=========
As I've mentioned, there are many libraries/products that support image processing, including conversions between various graphical formats.  A short list is GDI+, PaintLib, CxImage, LibTiff, LibJpeg, LibPng (and others).

=========
Here is a link to the MSDN knowledgebase topic that includes C++ programming examples:
http://msdn.microsoft.com/en-us/library/system.drawing.imaging.metafile(VS.71).aspx

0
 
LVL 22

Accepted Solution

by:
mbonaci earned 250 total points
ID: 24385608
0
 
LVL 22

Expert Comment

by:mbonaci
ID: 24735873
Is this resolved?
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Find Visual Studio Tools 2 78
I could not build boost code, 10 52
c++ syntax question 9 34
Problem with SqlConnection 5 117
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now