1. FreeImage wrapper
- Posted by angelushappyfm at evc.net Apr 07, 2002
- 359 views
Hi, I hope you'll be able to help me: I'm trying to make wrappers for FreeImage. I'm new at programming with Euphoria and even in C but I managed to wrap the BASS sound library and I wonder why it doesn't work with FreeImage as well though I use the same method. Does anyone know a useable wrapper already made or could simply help me understanding wrapping methods? Here is the code I used: ------------------------------------- atom FreeImage FreeImage = open_dll("FreeImage.dll") atom FreeImageInit FreeImageInit = define_c_proc(FreeImage, "FreeImage_Initialise", {}) global procedure FreeImage_Init() c_proc(FreeImageInit, {}) end procedure ------------------------------------- And it gives me this error message (whatever the function I try to wrap) ------------------------------------- C:\Euphoria\Perso\include/FreeImage.ew:17 in procedure FreeImage_Init() c_proc/c_func: bad routine number (-1) -------------------------------------- It obviously doesn't define the procedure correctly. Thanks in advance Olivier Mercier
2. Re: FreeImage wrapper
- Posted by tone.skoda at siol.net Apr 07, 2002
- 350 views
Brian Broker has already wrapped it and then I used it in my simple image editor: http://www10.brinkster.com/tskoda/euphoria.asp#TsEuImageEditor Brian: it's a shame you didn't submit this library to recent user contributions page to avoid someone re-wrapping it like it happened now. ----- Original Message ----- From: <angelushappyfm at evc.net> To: "EUforum" <EUforum at topica.com> Subject: FreeImage wrapper > > Hi, > > I hope you'll be able to help me: I'm trying to > make wrappers for FreeImage. I'm new at programming with Euphoria and > even in C but I managed to wrap the BASS sound library and I wonder > why it doesn't work with FreeImage as well though I use the same > method. > > Does anyone know a useable wrapper already made or could simply help me > understanding wrapping methods? > > Here is the code I used: > > ------------------------------------- > > atom FreeImage > FreeImage = open_dll("FreeImage.dll") > > atom FreeImageInit > > FreeImageInit = define_c_proc(FreeImage, "FreeImage_Initialise", {}) > > global procedure FreeImage_Init() > c_proc(FreeImageInit, {}) > end procedure > > ------------------------------------- > > And it gives me this error message (whatever the function I try to > wrap) > > ------------------------------------- > > C:\Euphoria\Perso\include/FreeImage.ew:17 in procedure FreeImage_Init() > c_proc/c_func: bad routine number (-1) > > -------------------------------------- > > It obviously doesn't define the procedure correctly. > > Thanks in advance > > Olivier Mercier > > > >
3. Re: FreeImage wrapper
- Posted by tone.skoda at siol.net Apr 08, 2002
- 371 views
Look better, I gave you credit in about box, where else do you want it? ----- Original Message ----- From: "Brian Broker" <bkb at cnw.com> To: "EUforum" <EUforum at topica.com> Subject: RE: FreeImage wrapper > > ...and it's a shame that I never got any credit for my work you used in > your project (at least I didn't see anything when you first released > it). > > I am working on supporting the multiple image interface, and writing > docs. I will release it to the archives when it's done (even if there > are other versions out there). > > You can still use http://www.cnw.com/~bkb/Eu/fi4eu.zip but please give > me some credit... > > -- Brian > > tone.skoda at siol.net wrote: > > Brian Broker has already wrapped it and then I used it in my simple > > image > > editor: > > > > http://www10.brinkster.com/tskoda/euphoria.asp#TsEuImageEditor > > > > Brian: it's a shame you didn't submit this library to recent user > > contributions page to avoid someone re-wrapping it like it happened now. > > > > ----- Original Message ----- > > From: <angelushappyfm at evc.net> > > To: "EUforum" <EUforum at topica.com> > > Sent: Sunday, April 07, 2002 6:40 PM > > Subject: FreeImage wrapper > > > > > > > Hi, > > > > > > I hope you'll be able to help me: I'm trying to > > > make wrappers for FreeImage. I'm new at programming with Euphoria and > > > even in C but I managed to wrap the BASS sound library and I wonder > > > why it doesn't work with FreeImage as well though I use the same > > > method. > > > > > > Does anyone know a useable wrapper already made or could simply help me > > > understanding wrapping methods? > > > > > > Here is the code I used: > > > > > > ------------------------------------- > > > > > > atom FreeImage > > > FreeImage = open_dll("FreeImage.dll") > > > > > > atom FreeImageInit > > > > > > FreeImageInit = define_c_proc(FreeImage, "FreeImage_Initialise", {}) > > > > > > global procedure FreeImage_Init() > > > c_proc(FreeImageInit, {}) > > > end procedure > > > > > > ------------------------------------- > > > > > > And it gives me this error message (whatever the function I try to > > > wrap) > > > > > > ------------------------------------- > > > > > > C:\Euphoria\Perso\include/FreeImage.ew:17 in procedure FreeImage_Init() > > > c_proc/c_func: bad routine number (-1) > > > > > > -------------------------------------- > > > > > > It obviously doesn't define the procedure correctly. > > > > > > Thanks in advance > > > > > > Olivier Mercier > > > > > > > > >