Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Resizing a bunch of pictures
Message
From
05/11/2003 08:24:29
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00846319
Message ID:
00846392
Views:
22
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform