Board index » cppbuilder » Reduce MB - size of TBitmap

Reduce MB - size of TBitmap

Hi...

I have made a TBitmap in this way:

Graphics::TBitmap *bitmap1 = new Graphics::TBitmap();
...
bitmap1->PixelFormat = pf15bit;
bitmap1->SaveToFile("c:\\myBitmap.jpg");

The size of bitmap1 ist very high (1.5 MB). How can I make it smaller
without loosing very much quality? With PixelFormat this is not possible
(pf15bit is very good, with pf8bit it looses much quality).

Does somebody know how I can maky my bitmap a smaller size?

Regards,
Mauro

 

Re:Reduce MB - size of TBitmap


Quote
"Mauro" <mauro.c...@gmx.de> wrote in message

news:3e356a60@newsgroups.borland.com...

Quote
> The size of bitmap1 ist very high (1.5 MB).

As well it should, as a bitmap has no compression.  What are the width and
height of the bitmap?  The size of the bitmap data is directly related to
the product of the height and width being multiplied together, with some
extra data for header info and such.

Quote
> How can I make it smaller without loosing very much quality?

Compress the file after you save it, and then uncompress it before loading
it later.  Or else don't use a bitmap to begin with, maybe use a jpg or a
png instead.

Gambit

Other Threads