|
-
May 10th, 2009, 10:14 AM
#1
Thread Starter
New Member
FreeImage_Rescale Error
I'm using FreeImage (version 2.4, dated 2008/07/01 according to the file header) to load, determine image size and rescale an image. The loading and size work fine. But when I use the FreeImage_Rescale function I get a run-time error that says "Can't find DLL entry point _FreeImage_Rescale@16 in Freeimag.dll". The rescale function is called thusly: rescalepercent = FreeImage_RescaleEx(dib, 1.5, 1.5)
Tracing the error in debug shows the offending line "hDIBNew = FreeImage_Rescale(hDIB, lNewWidth, lNewHeight, eFilter)" occurs in function FreeImage_RescaleEx.
Is this a bug in FreeImage or am I missing something? Any help/advise is greatly appreciated.
HTML Code:
Public Sub FImageLoad(sFileName As String, sWidthPix As Single, sHeightPix As Single, _
sResolution As Single)
Dim dib As Long, rescalepercent As Long
Dim bOK As Long ', sWidth As Single, sHeight As Single, sResolution As Single
Dim mymsg As String, fif As FREE_IMAGE_FORMAT
fif = FreeImage_GetFileType(sFileName)
dib = FreeImage_Load(fif, sFileName, 0) '"\screenshot.bmp", 0)
FreeImage_GetResolutionY (dib)
sWidthPix = FreeImage_GetWidth(dib)
sResolution = FreeImage_GetResolutionX(dib)
sHeightPix = FreeImage_GetHeight(dib)
mymsg = "Width: " & sWidthPix / sResolution & " Resolution: " & sResolution
MsgBox (mymsg)
rescalepercent = FreeImage_RescaleEx(dib, 1.5, 1.5)
FreeImage_Unload (dib)
End Sub
Mike
-
May 10th, 2009, 11:35 PM
#2
Frenzied Member
Re: FreeImage_Rescale Error
Use the Depends tool to see if the function exists within the dll. More than likely, it is your API declaration that is incorrect.
Good Luck
Option Explicit should not be an Option!
-
May 12th, 2009, 11:24 AM
#3
Thread Starter
New Member
Re: FreeImage_Rescale Error
Thanks. I'll look into that tonight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|