Can I open and split an EMF image file ?

Discussions about image processing and document imaging.
Post Reply
oneuser
Posts: 10
Joined: Wed May 23, 2007 11:12 am

Can I open and split an EMF image file ?

Post by 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

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by 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

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 2 guests