How to compress BMP image programatically..


J

Jigar Mehta

Hye Friends!!,
Happy New Year!!

I am Jigar Mehta from India. Currently I am working on a project in
which I need to compress some images on the harddisk... I want to make an
engine that reads whole BMP image and then compress it.. The target location
can be of any type.. BMP, TIFF, JPG or any.. Some data loss will be
negligible because all the images are having very high resolution with
32-bit colors (taken from digi-cam).

So, is there any library available in VC.NET for compressing the images
or saving it with some different settings?? Or can we use any other free
library for the task?

If you know any way by which we can compress the images (BMP types) then
please suggest me the way.. I have to do it in VC.NET only.. (as it is a
multithreaded program-fully automated)
 
Ad

Advertisements

C

codymanix

In my knowledge, the Image class can convert images types to jpeg.
 
J

Jigar Mehta

Which image class, can I have more details...

In my knowledge, the Image class can convert images types to jpeg.
 
C

Carl Daniel [VC++ MVP]

Jigar said:
Hye Friends!!,
Happy New Year!!

I am Jigar Mehta from India. Currently I am working on a project
in which I need to compress some images on the harddisk... I want to
make an engine that reads whole BMP image and then compress it.. The
target location can be of any type.. BMP, TIFF, JPG or any.. Some
data loss will be negligible because all the images are having very
high resolution with 32-bit colors (taken from digi-cam).

So, is there any library available in VC.NET for compressing the
images or saving it with some different settings?? Or can we use any
other free library for the task?

If you know any way by which we can compress the images (BMP
types) then please suggest me the way.. I have to do it in VC.NET
only.. (as it is a multithreaded program-fully automated)
There are many image processing libraries available, some free, some not.
For the best performance (as far as any I've used), the clear choice is
Pegasus (http://www.pegasusimaging.com/documentimaging.htm). It's also the
most expensive and has a horribly (and needlessly) difficult 'C' API. (They
also support COM and .NET APIs that are much more sensible).

Intel provides graphics libraries as a part of the Intel Performance
Primitives
(http://www.intel.com/software/products/perflib/index.htm?iid=ipp_home+softw
are_libraries). These libraries were free at one time, but that's no longer
the case. These libraries are reasonably performant for most operations
(although for JPEG, for example, Pegasus will be 2-4 times faster than Intel
IPP).

There's a large opensource image processing library called ImageMagik that's
very popular on *nix. It include a broad selection of moderately performant
image processing functions.

If you're only interested in image compression/decompression, there are
individual open-source libraries available for most popular formats. Try
searching with Google for 'libJPEG', 'libPNG', 'libTIFF'.

-cd
 
G

Guest

-----Original Message-----
automated)

Hi Jiger Mehta,

I am Gangadhar Chiplunkar ( Indian, but now in US ). I
think you can use GDI+ Image object, load the bitmap from
disk file and while saving choose JPEG or other format
which is nothing but compressed image. Hope this works
for you.

Cheers, Chiplunkar G.K. (e-mail address removed)
 
C

Carl Daniel [VC++ MVP]

Hi Jiger Mehta,
I am Gangadhar Chiplunkar ( Indian, but now in US ). I
think you can use GDI+ Image object, load the bitmap from
disk file and while saving choose JPEG or other format
which is nothing but compressed image. Hope this works
for you.
Yes, you can do some of this using GDI+, but AFIAK, the performace is bad
and you're not able to control the compression process very well. Still,
might be an option depending on the application.

-cd
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top