Solved

Fast BMP to PNG conversion

Posted on 2009-05-07
4
473 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
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…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

772 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

12 Experts available now in Live!

Get 1:1 Help Now