Link to home
Start Free TrialLog in
Avatar of fjunior
fjunior

asked on

savepicture palette

How can I maitain or set the picture palette when saving using savepicture statement?
Avatar of Sendoh
Sendoh
Flag of New Zealand image

Hi !
What is your problem here ??
You can make it after calling savepicture statement and extract the palette from the saved bmp file right ??
Avatar of fjunior
fjunior

ASKER

Hi !

I have one 256 color bitmap on a picture box. I want to print some text on it and then save it in the same 256 color format.
I have to keep these palette. Using savepicture always change the bitmap palette to 24bit (monitor setup).

Thanks.

Hi !
I'm afraid you can't do that if you insist to use savepicture method. Ths only solution I can think off is used direct-x with vb and extract the bitmap from that 256 color file and then print some text on it. Then just convert them to 256 format again.
BTW, the convertion of 24bit to 256 were very complex.
Avatar of fjunior

ASKER

Can you tell me how to do this with directx?

Tahnks a lot.

instead of using this code:

savepicture picture1.picture

use this

savepicture picture1.image

you will get different results
ASKER CERTIFIED SOLUTION
Avatar of rondeauj
rondeauj

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of fjunior

ASKER

I'm using  'savepicture picture1.image' to save changed bitmaps.

Unfortunately VB can't keep the palette.