Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using VFP to Compress JPGs in Excel
Message
De
05/12/2012 09:38:18
 
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
01558787
Message ID:
01558790
Vues:
78
>I wrote a VFP 9.0 program to automate Excel 2010. My program correctly imports JPG's into the spreadsheet, but the spreadsheet becomes too large. I can manually compress the JPG's by selecting one on each worksheet, and clicking Picture Tools-Format:Compress Pictures, then unchecking "Apply only to this picture" and selecting "E-mail (96 ppi)". However, I want to do this programmatically. Does anybody know how FoxPro can get the Excel Object Model to compress pictures in a spreadsheet?
>
>Jerry
>
>PS: Doing it while creating an Excel macro yields no VBA code.

You can use GDIPlusX to compress the image file inside VFP. Check http://vfpx.codeplex.com/wikipage?title=GDIPlusX&referringTitle=Home and http://weblogs.foxite.com/vfpimaging/2012/03/16/resizing-images-with-gdiplusx/

For more samples, I encourage you to Google "GDIPlusX resize"
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform