Solved

Fast BMP to PNG conversion

Posted on 2009-05-07
4
484 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

856 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