Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Resizing a bunch of pictures
Message
De
05/11/2003 08:24:29
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00846319
Message ID:
00846392
Vues:
23
>You can make it with file #18584 :
>
>#include gpImage.h
>If Not "gpImage" $ Set("Procedure")
>	Set Procedure To gpImage Additive
>EndIf
>
>gdip = CreateObject("gpInit")
>img = CreateObject("gpImage")
>
>lnPics = ADIR(aPics,'*.JPG')
>FOR i = 1 To lnPics
>    img.Load(aPics[i,1])
>    img.Resize(160, 120, InterpolationModeHighQualityBicubic)
>    img.SaveAsJPEG('_'+aPics[i,1])
>ENDFOR
>
When trying to run it as:
#include gpImage.h
If Not "gpImage" $ Set("Procedure")
	Set Procedure To gpImage Additive
EndIf

gdip = CreateObject("gpInit")
img = CreateObject("gpImage")

* Create thumbnail and store as JPEG
img.Load("d:\iis\asap\Event\LasVegas\100-0006_IMG.JPG")
img.Thumbnail(160, 120)
img.SaveAsJPEG("d:\iis\asap\Event\LasVegas\Thumbnail\100-0006_IMG.JPG")
I get a GDI+ error in GPIMAGES.SAVEASJPEG.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform