Hi everyone ,
Is there a way to compress an image of any size and dpi to a ceratin zise(
2inch) and 150dpi using vba?
In other words, to 300 pixels?
There are external image processing libraries you can use for this kind of
thing and at least some can be called from VB/VBA. A google search should
locate some examples.
You can also invoke some programs from the command line. IrfanView
(
http://www.irfanview.com) is a good example. It'll do downsamping from a
command line prompt, which means that you can use SHELL "command line" to fire
it off.
And depending on the version of PPT, you can size the image so it's the number
of pixels you need on screen then copy/paste special as PNG back into PPT and
export that shape to a file. It'd be a bit tricky to get the exact number of
pixels you need (and may not even be possible) but if close is good enough and
you don't want to rely on external code, it's one approach.