GDPicture in Web service

Discussions about document viewing.
Post Reply
Vxvx
Posts: 8
Joined: Wed Feb 03, 2010 11:48 am

GDPicture in Web service

Post by Vxvx » Tue Nov 02, 2010 3:45 pm

Hi! I am using GDPicture in asmx web service for creating thumbs! This is my function that doing that!

Code: Select all

 Public Function getThumbGDViewer(ByVal filename As String) As Integer
        Dim imgSource As Image 
         Dim intThumbWidth, intThumbHeight, thumbNumber As Int32
        Dim ObjGDpicture As New GdPictureImaging
        Dim puthThumb As String
         Try
            fi = New FileInfo(filename)

        Catch ex As Exception
                       Return 1
            Exit Function
        End Try
        puthThumb = fi.DirectoryName & "\" & "thumb" & fi.Name
        Dim nImageID, nThumbnailID As Int64
        If Not File.Exists(nazivfajla) Then
            nThumbnailID = ObjGDpicture.CreateGdPictureImageFromFile(filename)
            thumbNumber = ObjGDpicture.CreateThumbnail(nThumbnailID, 100, 100)
            If nThumbnailID <> 0 Then
                ObjGDpicture.SaveAsBMP(thumbNumber, puthThumb)
                 End If
        Else
            nThumbnailID = ObjGDpicture.CreateGdPictureImageFromFile(filename)
            thumbNumber = ObjGDpicture.CreateThumbnail(nThumbnailID, 100, 100)
            If nThumbnailID <> 0 Then
                ObjGDpicture.SaveAsBMP(thumbNumber, puthThumb)
            End If
        End If
        Return 0
    End Function
Now when i call this function from client application it's return me next error:
Server was unable to process request. ---> Unable to load DLL 'GdPicture.NET.image.gdimgplug.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)
What i am doing wrong? Thanks!

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

Re: GDPicture in Web service

Post by Loïc » Tue Nov 02, 2010 5:46 pm

Hi,

As the message said the GdPicture.NET.image.gdimgplug.dll can not be loaded.
So you have to put this dll in the same folder of your application. if the problem persists, try to copy it in folder defined in the path environment variable.

Kind regards,

Loïc

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests