Solved

Fast BMP to PNG conversion

Posted on 2009-05-07
4
486 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

749 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