Macro to change color depth of all images (BMPs) in document?

O

ohaya

Hi,

I was wondering if it's possible for a macro (or something else maybe)
to go through a Word document and change the color depth of all images
in the document?

I do a lot of technical documents where I include screenshots, and to
reduce the document file size, I change the color depth of the images
(using Paint) to 256 bit, but this is very time-consuming, so I was
wondering if it'd be possible to automate this?

Thanks,
Jim
 
J

Jonathan West

ohaya said:
Hi,

I was wondering if it's possible for a macro (or something else maybe) to
go through a Word document and change the color depth of all images in the
document?

I do a lot of technical documents where I include screenshots, and to
reduce the document file size, I change the color depth of the images
(using Paint) to 256 bit, but this is very time-consuming, so I was
wondering if it'd be possible to automate this?

In principle this is possible, if you can write or get hold of the necessary
graphics libraries. I have had some success compressing images using
Freeimage.dll, which is an open source freeware graphics library. I can't
remember offhand whether Freeimage can change color depth, but I suspect it
can.

However, I would suggest an entirely different approach. I suspect that you
are using the Alt-Printscreen function to take your screenshots. Don't.
Instead, invest in a proper screen capture program (I use SnagIt) and use
that to take your screenshots. Set up to save the screenshots as graphic
files in PNG format. This will enable your graphics to have much smaller
file sizes than the bitmaps produced by Alt-Printscreen. Then you can insert
the graphic files into your Word document, and you won't need to reduce the
color depth to 256 colors.
 

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