on 07-10-2017 8:08 PM
Hi Everyone,
I am trying to change the image resolution (lower) i am using image magic for conversion. but i am unable to convert the file to lower resolution. please help with any code snippets.
Thank you.
I would try using their OLE interface. Here is an example that converts a JPG to PNG.
OLEObject oMagick
String ls_origfile, ls_destfile
Integer li_rc
Any la_result
ls_origfile = "C:\PBSource\PB105\ImageMagick\Totoro.jpg"
ls_destfile = "C:\PBSource\PB105\ImageMagick\Totoro.png"
oMagick = Create OLEObject
li_rc = oMagick.ConnectToNewObject("ImageMagickObject.MagickImage")
If li_rc = 0 Then
la_result = oMagick.Convert(ls_origfile, "-format", "png", ls_destfile)
MessageBox("Convert", "Result: " + String(la_result))
Else
MessageBox("ConnectToNewObject", "Failed: " + String(li_rc), StopSign!)
End If
oMagick.DisconnectObject()
Destroy oMagick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.