Solved

Fast BMP to PNG conversion

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

734 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