Solved

Fast BMP to PNG conversion

Posted on 2009-05-07
4
480 Views
Last Modified: 2013-12-14
We are trying to compress a 1280x1024x24 bit BMP file to PNG and decompress it  back to BMP format. Using CxImage library takes around 70ms (PNG->BMP)  on an Intel Core2Duo PC. Is there a faster library or code blocks or Windows APIs that can be used? We are also looking to minimizing the CPU usage for this.
0
Comment
Question by:arijit_rebaca
4 Comments
 
LVL 9

Expert Comment

by:JohnGaby
ID: 24326930
You could try using the Image class of GDI+.  It can do the conversion, but I don't know if it would be faster or not.

http://msdn.microsoft.com/en-us/library/ms534462(VS.85).aspx
0
 

Author Comment

by:arijit_rebaca
ID: 24333776
We tried the gdi+ apis like image->Save. The conversion is fine but the time taken is almost 200 ms. Is there any other way to make it faster than 70 ms? Also we are looking to get the image in a buffer format instead of files,  i.e. we will give the image buffer to the said application and the application will give us the converted image buffer.
0
 
LVL 33

Accepted Solution

by:
pgnatyuk earned 250 total points
ID: 24334069
70ms is a good time for such image. Take a look: http://www.irfanview.com/
it is a very simple editor (probably based on CxImage). It converts the files.
I use PNGLib directly, I need only one way PNG->BMP, but I have bigger files.
PNGLib allows to load the PNG (very fast operation), then left to create the DIB section and make the bit array. So how fast it can be?
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

770 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