New Image plugin available for beta-testing
-
- User
- Posts: 39
- Joined: Fri Mar 26, 2004 1:47 pm
- Location: London, UK
- Contact:
Welcome aboard
Hi Ginger
Download it from here:
http://www.purearea.net/pb/download/use ... LE_2.3.zip
Unzip it in your PureBasic folder so that the library file goes into
C:\Program Files\PureBasic\PureLibraries\UserLibraries
and put the EC_ImagePluginOLE.chm help file into
C:\Program Files\PureBasic\Help
(NB: your installed path may be different)
There's some example code in the zip file too.
Compile this for a very basic gif2jpg app.
Drag a .gif file onto the compiled exe and it will render as jpg.
There's quite a few user-libs here: http://www.purearea.net/pb/english/index.htm
Download it from here:
http://www.purearea.net/pb/download/use ... LE_2.3.zip
Unzip it in your PureBasic folder so that the library file goes into
C:\Program Files\PureBasic\PureLibraries\UserLibraries
and put the EC_ImagePluginOLE.chm help file into
C:\Program Files\PureBasic\Help
(NB: your installed path may be different)
There's some example code in the zip file too.
Compile this for a very basic gif2jpg app.
Drag a .gif file onto the compiled exe and it will render as jpg.
Code: Select all
Enumeration
#imgGif
EndEnumeration
UseEC_OLEImageDecoder()
UseJPEGImageEncoder()
; check for command line parameters
filename.s = Trim(ProgramParameter())
If filename <> ""
If LoadImage(#imgGif, filename) ;load this image
filename=ReplaceString(filename,".gif",".jpg")
SaveImage(#imgGif, filename ,#PB_ImagePlugin_JPEG, 9 ) ;save as jpg
FreeImage(#imgGif)
EndIf
EndIf
Just a side note.. (didnt read your posts sorry) the GIF licence expired some time ago... so no trouble whatsover. Its just a myth on the net now and I guess not many persons got the good news (although as el choni stated, it IS quite obsolete) for some reason some programmers still like them.. and want support for them though.
I only had to change the BSS section, it works:
http://www.inicia.es/de/elchoni/EC_ImagePluginPPM.zip
To use it:
To save:
I also have plugins for PBM, PGM, XPM, XBM, WBMP and IFF, just in case somebody needs those.
Regards,
http://www.inicia.es/de/elchoni/EC_ImagePluginPPM.zip
To use it:
Code: Select all
UseEC_PPMImageDecoder()
UseEC_PPMImageEncoder()
Code: Select all
SaveImage(0, FileName$, 'PPM')
Regards,
El_Choni
BTW, forgot to tell you, it saves in PPM/P3 by default (loads both P3 and P6). If you want to save in P6 format, use:
And here's the IFF plugin:
http://www.inicia.es/de/elchoni/EC_ImagePluginIFF.zip
The decoder is always thread safe, but the encoder isn't. The decoder supports classic palete IFF, IFF 24, ILBM, PBM, HB, EHB, HAM5-6-7-8-10 (although I haven't found any HAM 5-7-10 to test it, it should work).
It only encodes in IFF24.
To use:
Enjoy it,
Code: Select all
UseEC_P6ImageEncoder()
;
SaveImage(0, FileName$, 'P6')
http://www.inicia.es/de/elchoni/EC_ImagePluginIFF.zip
The decoder is always thread safe, but the encoder isn't. The decoder supports classic palete IFF, IFF 24, ILBM, PBM, HB, EHB, HAM5-6-7-8-10 (although I haven't found any HAM 5-7-10 to test it, it should work).
It only encodes in IFF24.
To use:
Code: Select all
UseEC_IFFImageDecoder()
UseEC_ILBMImageEncoder()
;
SaveImage(0, FileName$, 'ILBM')
El_Choni