GFL Based On v1.93, v0.11 . 99% compileted
GFL Based On v1.93, v0.11 . 99% compileted
Before using this you'll need to download the SDK located on XnView's website;
http://www.xnview.com ; download the SDK
http://www.inet.net.nz/~tjr/irc/GFL_PB11.zip
please test, if you can.
don't forget to read all the readme.txt this is very important
As there are no docs per-say, the docs are in the revision history for the moment, I shall put together some docs later.
http://www.xnview.com ; download the SDK
http://www.inet.net.nz/~tjr/irc/GFL_PB11.zip
please test, if you can.
don't forget to read all the readme.txt this is very important
As there are no docs per-say, the docs are in the revision history for the moment, I shall put together some docs later.
Last edited by Inner on Wed Jul 23, 2003 7:31 am, edited 5 times in total.
Since no one else wants to reply to this;
, there is a slight bug in LoadGFLImage() deep in the core processing functions, where GIF images have the colormaps corrupted, I am in the process of fixing this now. FIXED
+ please give me some feedback, myself & Fred have worked very hard to make GFL work under PB, I find it disheartening to some extent that I've gotten no feed back, this project is push my skills as a programmer, in ways I never thought it would.

+ please give me some feedback, myself & Fred have worked very hard to make GFL work under PB, I find it disheartening to some extent that I've gotten no feed back, this project is push my skills as a programmer, in ways I never thought it would.
Last edited by Inner on Fri Jul 18, 2003 5:52 am, edited 1 time in total.
Wow, great work Inner.. That will make a *lot* of people's image headaches disappear!
I wish the xnview stuff was available under a developers license or something so I could include it in some commercial products but I'll still use it for freeware!
Thanks!
I wish the xnview stuff was available under a developers license or something so I could include it in some commercial products but I'll still use it for freeware!
Thanks!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
I've downloaded the SDK and your .zip, but
I don't know when I'll get around to installing
and trying it. It would be nice if the SDK was
just in a .zip. My windoze is touchy with
installing/removing stuff.
I'm sure there's folks who will know better
than I do how to use this enhancement!
Joe
I don't know when I'll get around to installing
and trying it. It would be nice if the SDK was
just in a .zip. My windoze is touchy with
installing/removing stuff.
I'm sure there's folks who will know better
than I do how to use this enhancement!

Joe
peace
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
[pI 166Mhz 32Mb w95]
[pII 350Mhz 256Mb atir3RagePro WinDoze '98 FE & 2k]
[Athlon 1.3Ghz 160Mb XPHome & RedHat9]
I could put the DLL in the next version, and the help.chm in there too.
If you read the readme.txt, it tells you about a " libgfl193.dll " which exists in the SDK, under the folder " \GflSDK v1.93\lib\full ", this DLL has to be copyed into the " \PureBasic\Compilers ", it's all relitively simple, you don't " have " to use the glf* commands at all, all you need to do is, LoadGFLImage(#image,"filename") and then use the ever so popular PureBasic image commands on it from there.
For those with advanced knowlage and understanding of the Windows Operating System, thet can use the gfl* which adds extra features and afords better flexability. (oh help I sound like a salesman)
I've never been good at writting manuals :roll:
Oh yes, and it's one of my pet grips about GFL SDK, it's an EXE and it needs to be installed, it's _NOT_ right, it should be a .ZIP
If you read the readme.txt, it tells you about a " libgfl193.dll " which exists in the SDK, under the folder " \GflSDK v1.93\lib\full ", this DLL has to be copyed into the " \PureBasic\Compilers ", it's all relitively simple, you don't " have " to use the glf* commands at all, all you need to do is, LoadGFLImage(#image,"filename") and then use the ever so popular PureBasic image commands on it from there.
For those with advanced knowlage and understanding of the Windows Operating System, thet can use the gfl* which adds extra features and afords better flexability. (oh help I sound like a salesman)
I've never been good at writting manuals :roll:
Oh yes, and it's one of my pet grips about GFL SDK, it's an EXE and it needs to be installed, it's _NOT_ right, it should be a .ZIP

;-----------------------------------------------------------------------------
;v0.8
;-----------------------------------------------------------------------------
Cleaned - Mess in GflLib, I have an order in life, Constants / Structures /
Procedures, not a mess with them all mixed up with each other, now
I can see to add extra functions
Fixed - LoadGFLImage() bug, if no filename would return successful load,
optimized, and safe gaurded a few things, and general
clean up.
Fixed - Protected all my internal veriables in my code, I shouldn't be able
to interact with any globals outside of these functions now.
(NB: this is _not_ a joy to work with, this being GFL)
Added - gfldisplay_example.pb , this example demonstates the way you use GFL
to display an image on a window, without the need to resort to
transfering the image data to the Pure Basic image system, and will
ultimately be infintly more powerful too. examine the SDK for more
details on why it will be
Added - gflDisplayImage() , takes a window pointer, and a GFL_BITMAP and
and displays it on the desired window, done as a result of my own
struggels with the code, so that you don't have too.
( and frankly how it was supposed to be done if ask me )
;v0.8
;-----------------------------------------------------------------------------
Cleaned - Mess in GflLib, I have an order in life, Constants / Structures /
Procedures, not a mess with them all mixed up with each other, now
I can see to add extra functions

Fixed - LoadGFLImage() bug, if no filename would return successful load,
optimized, and safe gaurded a few things, and general
clean up.
Fixed - Protected all my internal veriables in my code, I shouldn't be able
to interact with any globals outside of these functions now.
(NB: this is _not_ a joy to work with, this being GFL)
Added - gfldisplay_example.pb , this example demonstates the way you use GFL
to display an image on a window, without the need to resort to
transfering the image data to the Pure Basic image system, and will
ultimately be infintly more powerful too. examine the SDK for more
details on why it will be

Added - gflDisplayImage() , takes a window pointer, and a GFL_BITMAP and
and displays it on the desired window, done as a result of my own
struggels with the code, so that you don't have too.
( and frankly how it was supposed to be done if ask me )
;-----------------------------------------------------------------------------
;v0.9 - 18 new functions
;-----------------------------------------------------------------------------
Added - gflFreeFileInformation()
Added - gflLoadPreview()
Added - gfldisplay_previewexample.pb
Added - gfldisplay_resizeexample.pb
Added - gfldisplay_rotateexample.pb
Added - gfldisplay_flipexample.pb
Added - BuildGFLReadFilePattern()
Added - BuildGFLWriteFilePattern()
Added - gflBrightness()
Added - gflContrast()
Added - gflNormalize()
Added - gflEqualize()
Added - gflEqualizeOnLuminance()
Added - gflLogCorrection()
Added - gflNegative()
Added - gflGetNumberOfColorsUsed()
Added - gflAdjustHLS()
Added - gflSepia()
Added - gflSwapColors()
Added - gflBalance()
Added - gflAddText()
Added - gflSepiaExt()
Fixed - removed Debug() calls from gflDisplayImage() (oops sorry)
Fixed - Typo, GFL_OpenLib() GFL_CloseLib(), was GLF_*
Changed - BuildGFLFilePattern() to BuildGFLReadFilePattern()
;v0.9 - 18 new functions

;-----------------------------------------------------------------------------
Added - gflFreeFileInformation()
Added - gflLoadPreview()
Added - gfldisplay_previewexample.pb
Added - gfldisplay_resizeexample.pb
Added - gfldisplay_rotateexample.pb
Added - gfldisplay_flipexample.pb
Added - BuildGFLReadFilePattern()
Added - BuildGFLWriteFilePattern()
Added - gflBrightness()
Added - gflContrast()
Added - gflNormalize()
Added - gflEqualize()
Added - gflEqualizeOnLuminance()
Added - gflLogCorrection()
Added - gflNegative()
Added - gflGetNumberOfColorsUsed()
Added - gflAdjustHLS()
Added - gflSepia()
Added - gflSwapColors()
Added - gflBalance()
Added - gflAddText()
Added - gflSepiaExt()
Fixed - removed Debug() calls from gflDisplayImage() (oops sorry)
Fixed - Typo, GFL_OpenLib() GFL_CloseLib(), was GLF_*
Changed - BuildGFLFilePattern() to BuildGFLReadFilePattern()
You're just a coding fool aren't you! Keep up the good work!
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
#Karbon$="Yeah and I am not even harf done with the functions, there is still a multitude more to come.. probably released in the next 12-15 hours"
You're including the incorrect .pb
I shall add something about this in the documentation for the future, but.. your only include should be;
"GflLib.pb"
here is an example;
You're including the incorrect .pb
I shall add something about this in the documentation for the future, but.. your only include should be;
"GflLib.pb"
here is an example;
Code: Select all
;-----------------------------------------------------------------------------
; Code : T.J.Roughton (a.k.a) Inner
;
; Contributions & Help:
; Freak -
; Saboteur -
; AlphaSND/Fred - Alignment bug.
;
; if you spot any errors, please email tjr_inner@yahoo.co.nz
;
;-----------------------------------------------------------------------------
IncludeFile "GFLLib.pb"
#GAD_SCROLLAREA=0
#GAD_IMAGE=1
GFL_OpenLib()
;gflSetPluginsPathname("D:\SDK\GflSDK v1.93\Plugins\") ; you need to uncomment this with a correct path!
gflLibraryInit()
gflEnableLZW(#GFL_TRUE)
If(OpenWindow(0,0,180,320,200,#PB_Window_SystemMenu|#PB_Window_SizeGadget,"GFL Image Viewer")<>0)
CreateGadgetList(WindowID(0))
ImageGadget(#GAD_IMAGE,0,0,64,64,0)
filename.s=OpenFileRequester("OpenFile","",BuildGFLReadFilePattern(),"")
If(filename)
If(LoadGFLImage(0,filename)<>0)
il=#TRUE
SetGadgetState(#GAD_IMAGE,UseImage(0))
EndIf
EndIf
Repeat
EventID.l = WaitWindowEvent()
Until EventID = #PB_Event_CloseWindow
If(il=#TRUE)
FreeImage(0)
EndIf
gflLibraryExit()
GFL_CloseLib()
EndIf
And the 39 are...
;-----------------------------------------------------------------------------
;v0.10 +39 Commands (15 missing)
;-----------------------------------------------------------------------------
Added - gflEnhanceDetail()
Added - gflEnhanceFocus()
Added - gflFocusRestoration()
Added - gflEdgeDetectLight()
Added - gflEdgeDetectMedium()
Added - gflEdgeDetectHeavy()
Added - gflEmboss()
Added - gflEmbossMore()
Added - gflAverage()
Added - gflSoften()
Added - gflBlur()
Added - gflGaussianBlur()
Added - gflMaximum()
Added - gflMinimum()
Added - gflMedianBox()
Added - gflMedianCross()
Added - gflSharpen()
Added - gflJpegLosslessTransform()
Added - gflConvolve()
Added - gflDrawPointColor()
Added - gflDrawLineColor()
Added - gflDrawCircleColor()
Added - gflDrawRectangleColor()
Added - gflGetDefaultSaveParams()
Added - gflCloneBitmap()
Added - gflAllockBitmap()
Added - gflDrawPolylineColor()
Added - gflDrawPolygonColor()
Added - gflChangeColorDepth()
Added - gflSetColorAt()
Added - gflGetColorAt()
Added - gflCrop()
Added - gflAutoCrop()
Added - gflResizeCanvas()
Added - gflGetVersionOfLibformat()
Added - gflMemoryAlloc()
Added - gflMemoryRealloc()
Added - gflGetLabelForColorModel() ; Weird function, no docs.
Added - gflBitblt()
Added - gflReplaceColor()
Added - gflExportIntoClipboard()
Added - gflImportFromClipboard()
Added - gflImportFromHWND() ; I think this works.
Fixed - gflConvertBitmapIntoDIB() was calling the wrong library.
;-----------------------------------------------------------------------------
;v0.10 +39 Commands (15 missing)
;-----------------------------------------------------------------------------
Added - gflEnhanceDetail()
Added - gflEnhanceFocus()
Added - gflFocusRestoration()
Added - gflEdgeDetectLight()
Added - gflEdgeDetectMedium()
Added - gflEdgeDetectHeavy()
Added - gflEmboss()
Added - gflEmbossMore()
Added - gflAverage()
Added - gflSoften()
Added - gflBlur()
Added - gflGaussianBlur()
Added - gflMaximum()
Added - gflMinimum()
Added - gflMedianBox()
Added - gflMedianCross()
Added - gflSharpen()
Added - gflJpegLosslessTransform()
Added - gflConvolve()
Added - gflDrawPointColor()
Added - gflDrawLineColor()
Added - gflDrawCircleColor()
Added - gflDrawRectangleColor()
Added - gflGetDefaultSaveParams()
Added - gflCloneBitmap()
Added - gflAllockBitmap()
Added - gflDrawPolylineColor()
Added - gflDrawPolygonColor()
Added - gflChangeColorDepth()
Added - gflSetColorAt()
Added - gflGetColorAt()
Added - gflCrop()
Added - gflAutoCrop()
Added - gflResizeCanvas()
Added - gflGetVersionOfLibformat()
Added - gflMemoryAlloc()
Added - gflMemoryRealloc()
Added - gflGetLabelForColorModel() ; Weird function, no docs.
Added - gflBitblt()
Added - gflReplaceColor()
Added - gflExportIntoClipboard()
Added - gflImportFromClipboard()
Added - gflImportFromHWND() ; I think this works.
Fixed - gflConvertBitmapIntoDIB() was calling the wrong library.
Ahuh.. 
Now I understand I think...
Dependancy Tree.
GflLib.pb - Main Include ( this has to be included before all others )
then " libgfle.pb " or " GflLibExt.pb "
you only need libgfle.pb if you intend on using " libgfle193.dll ".
Example A:
IncludeFile "GflLib.pb"
IncludeFile "libgfle.pb"
IncludeFile "GflLibExt.pb"
Example B:
IncludeFile "GflLib.pb"
IncludeFile "GflLibExt.pb"
- As you can't use GFLLibExt.pb or Libgfle.pb, as standalone includes.
If I'm still not getting in Num3, please if you can show me some code

Now I understand I think...
Dependancy Tree.
GflLib.pb - Main Include ( this has to be included before all others )
then " libgfle.pb " or " GflLibExt.pb "
you only need libgfle.pb if you intend on using " libgfle193.dll ".
Example A:
IncludeFile "GflLib.pb"
IncludeFile "libgfle.pb"
IncludeFile "GflLibExt.pb"
Example B:
IncludeFile "GflLib.pb"
IncludeFile "GflLibExt.pb"
- As you can't use GFLLibExt.pb or Libgfle.pb, as standalone includes.
If I'm still not getting in Num3, please if you can show me some code

;-----------------------------------------------------------------------------
;v0.11
;-----------------------------------------------------------------------------
NB: We're done, however I will update for bug fixes, or updates to the
commands, perhaps some could find out why gflFile*() commands crash.
I've basically done everything I needed too do for my own purposes long
ago, and it's time for me to make that trip back to my main project and
start using this library for what I intended, I'll also do a update when/if
PB gets 64 Bit Floats.
Added - gflConvertDIBIntoBitmap() ; !! Untested !!
Added - gflConvertDDBIntoBitmap() ; !! Untested !!
Added - gflConvertBitmapIntoDIB() ; !! Untested !!
Added - gflConvertDDBIntoBitmap() ; !! Untested !!
Added - gflLoadBitmapIntoDIB() ; !! Untested !!
Added - gflLoadBitmapIntoDDB() ; !! Untested !!
Added - gflMerge() ; I can't get it too work, it keeps reporting
; an error of, bad params.
Fixed - gflGetErrorString() ; Should have been returning string, instead
; was the address of the string.
Unsupported - gflGetFileInformationFromHandle()
Unsupported - gflLoadBitmapFromHandle()
Unsupported - gflLoadPreviewFromHandle()
Unsupported - gflSaveBitmapIntoHandle()
; This 4 command, need callbacks, I couldn't find any infomation
; on the callbacks argument paramitors, so I've left them entirely.
Unsupported - gflFileCreate() ; !! Crashes !!
Unsupported - gflFileAddPicture() ; !! Crashes !!
Unsupported - gflFileClose() ; !! Crashes !!
; These 3 Don't ask, I don't know why, it has all the correct
; params in my test code.
Unsupported - gflRotateFine() ; needs 64 Bit Float
Unsupported - gflGamma() ; needs 64 Bit Float
Unsupported - gflAdjust() ; needs 64 Bit Float
Removed - Include "GflLibExt.Pb" from GflLib.pb, to force dependancy.
;v0.11
;-----------------------------------------------------------------------------
NB: We're done, however I will update for bug fixes, or updates to the
commands, perhaps some could find out why gflFile*() commands crash.
I've basically done everything I needed too do for my own purposes long
ago, and it's time for me to make that trip back to my main project and
start using this library for what I intended, I'll also do a update when/if
PB gets 64 Bit Floats.
Added - gflConvertDIBIntoBitmap() ; !! Untested !!
Added - gflConvertDDBIntoBitmap() ; !! Untested !!
Added - gflConvertBitmapIntoDIB() ; !! Untested !!
Added - gflConvertDDBIntoBitmap() ; !! Untested !!
Added - gflLoadBitmapIntoDIB() ; !! Untested !!
Added - gflLoadBitmapIntoDDB() ; !! Untested !!
Added - gflMerge() ; I can't get it too work, it keeps reporting
; an error of, bad params.
Fixed - gflGetErrorString() ; Should have been returning string, instead
; was the address of the string.
Unsupported - gflGetFileInformationFromHandle()
Unsupported - gflLoadBitmapFromHandle()
Unsupported - gflLoadPreviewFromHandle()
Unsupported - gflSaveBitmapIntoHandle()
; This 4 command, need callbacks, I couldn't find any infomation
; on the callbacks argument paramitors, so I've left them entirely.
Unsupported - gflFileCreate() ; !! Crashes !!
Unsupported - gflFileAddPicture() ; !! Crashes !!
Unsupported - gflFileClose() ; !! Crashes !!
; These 3 Don't ask, I don't know why, it has all the correct
; params in my test code.
Unsupported - gflRotateFine() ; needs 64 Bit Float
Unsupported - gflGamma() ; needs 64 Bit Float
Unsupported - gflAdjust() ; needs 64 Bit Float
Removed - Include "GflLibExt.Pb" from GflLib.pb, to force dependancy.