Page 4 of 5

Posted: Tue Aug 16, 2005 2:51 pm
by Ginger
Hi,
Very much a newbie here... is there a help file available yet?

Welcome aboard

Posted: Tue Aug 16, 2005 3:32 pm
by pantsonhead
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.

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
There's quite a few user-libs here: http://www.purearea.net/pb/english/index.htm

Posted: Wed Aug 17, 2005 3:15 am
by Ginger
Hey, thanks very much pantsonhead! (Hehe, love that name :lol: ) This plugin will be veerrrry handy.

Cheers

Posted: Thu Aug 18, 2005 8:14 am
by dagcrack
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.

Posted: Sun Nov 13, 2005 9:18 pm
by Xombie
I don't suppose there's a chance this fella can decode png, is there? It'd be nice to just use this image library instead of having to use the decode png library as well. My program jumps like 90kb just for using the png library >_>

Posted: Sun Feb 19, 2006 7:24 pm
by Shannara
Any chance this could be updated to PB4?

Posted: Fri Feb 24, 2006 2:05 pm
by zued
.PPM support ?

/svensken

Posted: Fri Feb 24, 2006 2:20 pm
by El_Choni
I have a PPM plugin, I haven't tested it with PB4, I'll tell you this evening when I'm home.

Posted: Fri Feb 24, 2006 4:15 pm
by El_Choni
I only had to change the BSS section, it works:

http://www.inicia.es/de/elchoni/EC_ImagePluginPPM.zip

To use it:

Code: Select all

UseEC_PPMImageDecoder()
UseEC_PPMImageEncoder()
To save:

Code: Select all

SaveImage(0, FileName$, 'PPM')
I also have plugins for PBM, PGM, XPM, XBM, WBMP and IFF, just in case somebody needs those.

Regards,

Posted: Fri Feb 24, 2006 5:37 pm
by Shannara
IFF format is super helpful over here :) Thank you El_Chroni .. I'll run the plugin against PB4 when I get home.

Posted: Fri Feb 24, 2006 8:24 pm
by zued
El_choni... Thanks. Workes great!

/svensken

Posted: Fri Feb 24, 2006 10:12 pm
by 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:

Code: Select all

UseEC_P6ImageEncoder()
;
SaveImage(0, FileName$, 'P6')
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:

Code: Select all

UseEC_IFFImageDecoder()
UseEC_ILBMImageEncoder()
;
SaveImage(0, FileName$, 'ILBM')
Enjoy it,

Posted: Fri Feb 24, 2006 10:47 pm
by Shannara
damn thats awesome :) And threadsafe to boot! The new jpeg decoder for pb4 only adds 30K instead of 90K(?) like previous versions. However, yours have alot more decoding power :)

Posted: Sat Feb 25, 2006 3:41 am
by El_Choni
Ok, IFF encoding is also threadsafe now:

http://www.inicia.es/de/elchoni/EC_ImagePluginIFF.zip

Posted: Fri Apr 07, 2006 2:27 am
by Fangbeast
G'day El_Choni, do you have an updated package containing all the decoders that support pb4?