Cannot retrieve ImageID

General discussions about GdPicture.NET.
Post Reply
sroney
Posts: 3
Joined: Mon Oct 05, 2009 11:10 pm

Cannot retrieve ImageID

Post by sroney » Mon Oct 05, 2009 11:17 pm

Hello,
I am getting an error when trying to open an image by file name:
GdiplusNotInitialized
Public Function getNumPages(ByVal fileName As String) As Integer
MsgBox(fileName)
Dim numpages As Integer = 0
Try

Dim gdimage As New GdPictureImaging()
gdimage.SetLicenseNumber("xxx")

Dim ImageID As Integer = gdimage.CreateGdPictureImageFromFile(fileName)
MsgBox("imageid: " & ImageID)

MsgBox("status: " & gdimage.GetStat)
numpages = CStr(gdimage.TiffGetPageCount(ImageID))
MsgBox(numpages)
gdimage.ReleaseGdPictureImage(ImageID)

gdimage = Nothing

Catch ex As Exception
MsgBox(ex.StackTrace)
End Try

getNumPages = numpages
End Function

Any ideas?

Shawn

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

Re: Cannot retrieve ImageID

Post by Loïc » Tue Oct 06, 2009 12:13 am

Hi Shawn,

What version of GdPicture.NET are you using ?
I need version number and framework.

Kind regards,

Loïc

sroney
Posts: 3
Joined: Mon Oct 05, 2009 11:10 pm

Re: Cannot retrieve ImageID

Post by sroney » Tue Oct 06, 2009 5:03 pm

I am using version 6.1 and VB.net 2.0

Visual Studio 2008

Is that what you are looking for?

Shawn

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

Re: Cannot retrieve ImageID

Post by Loïc » Tue Oct 06, 2009 5:07 pm

OK thank you.

Please, try the latest edition (upgrade isfree).

We solved a similar bug some weeks ago.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest