Loading...

Can I open and split an EMF image file ?

Support for GdPicture Light Imaging Toolkit and GdPicture Pro Imaging ActiveX/SDK.

Can I open and split an EMF image file ?

Postby oneuser » Wed May 23, 2007 11:02 pm

Hello,

My problem is that I have a .EMF file and I must to split this file in some file with know dimension.

Whit your library it is possible

Can you help me ?



Thanks for your time
- From esupport message -
oneuser
 
Posts: 10
Joined: Wed May 23, 2007 11:12 am

Postby Loïc » Thu May 24, 2007 10:40 am

Hi,

With GdPicture Pro or GdPicture Light you can do that easily.

I give you a sample to load an emf image file and extract 2 zones of this image as jpeg files:

Code: Select all
Dim oGdPicture As New GdpicturePro.cGdPicture
Dim nInputImageID As Long
Dim nImageSplit1 As Long, nImageSplit2 As Long

nInputImageID = oGdPicture.CreateImageFromFile("c:\image.emf")
nImageSplit1 = oGdPicture.CreateClonedImageArea(nInputImageID, 10, 20, 200, 300)
nImageSplit2 = oGdPicture.CreateClonedImageArea(nInputImageID, 200, 300, 200, 300)

oGdPicture.SetNativeImage (nImageSplit1)
oGdPicture.SaveAsJpeg ("c:\split1.jpg")
oGdPicture.CloseImage (nImageSplit1)

oGdPicture.SetNativeImage (nImageSplit2)
oGdPicture.SaveAsJpeg ("c:\split2.jpg")
oGdPicture.CloseImage (nImageSplit2)

oGdPicture.CloseImage (nInputImageID)

Set oGdPicture = Nothing



Best regards,

Loïc Carrère
User avatar
Loïc
Site Admin
 
Posts: 4430
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to GdPicture [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 3 guests

cron