Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / September 2007

Tip: Looking for answers? Try searching our database.

using macros to compress an image

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Harvey - 21 Sep 2007 16:18 GMT
Hi everyone ,
Is there a way to compress an image of any size and dpi to a ceratin zise(
2inch) and 150dpi using vba?
Signature

Best regards,
Harvey

Steve Rindsberg - 21 Sep 2007 17:40 GMT
> 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.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.