Page 1 of 1

Posted: Sun Apr 13, 2003 5:08 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Hi,

I'd like to know if it's possible to add image plugins as UserLibraries, so they can be used with LoadImage() and SaveImage(), and how to do it. Thanks,

El_Choni

Posted: Sun Apr 13, 2003 6:17 pm
by BackupUser
Restored from previous forum. Originally posted by Manolo.

Yo tampoco, hehehe

:)

Posted: Sun Apr 13, 2003 8:35 pm
by BackupUser
Restored from previous forum. Originally posted by Berikco.

Yes, its possible, as Fred rewrote the Image and Sound system to work with plugins.
I dont Know how it must be done.....Fred :)


Regards,

Berikco

http://users.pandora.be/berikco/purebasic.htm

Posted: Mon Apr 14, 2003 3:45 pm
by BackupUser
Restored from previous forum. Originally posted by fred.

I will post an example tonight and put it in the SDK if I got some time.

Fred - AlphaSND

Posted: Mon Apr 14, 2003 6:29 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Thanks, Fred :)

El_Choni

Posted: Mon Apr 14, 2003 8:40 pm
by BackupUser
Restored from previous forum. Originally posted by fred.

Ok, done. Try http://www.purebasic.com/ImagePluginFAKE.zip
Give me your comment and impressions to see if its easy enough to understand. Good luck !

Fred - AlphaSND

Posted: Tue Apr 15, 2003 7:32 pm
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Hi,

I've played a bit with the example and finally built a PureBasic library (doesn't decode for now, just returns width and height).

But PB complains: can't create PureBasic.exe

NAsm.out says:

Code: Select all

Functions\Image .text: undefined reference to 'PB_ImageDecoder_Register'
This is my desc file:

Code: Select all

ASM
;
0
;
LIB
;
1
ImagePlugin
;
ImagePlugin
; Version 1.0
UsePPMImageDecoder
None
;
;UsePPMImageEncoder
;None
;
This is the related part of the asm file:

Code: Select all

; Header:
extrn PB_ImageDecoder_Register

public PB_UsePPMImageDecoder

; Procedures GetWidth, Check, etc.

PB_UsePPMImageDecoder:
    cmp [Registered], dword 0
    jne .end
    mov [ID.Check], Check
    mov [ID.GetWidth], GetWidth
    mov [ID.GetHeight], GetHeight
    mov [ID.Decode], Decode
    push dword ID
    call PB_ImageDecoder_Register
    mov [Registered], dword 1
  .end:
    mov eax, [Registered]
    ret
Anyone can give me a clue about this? I'm thinking of going back to Nasm, I'm not familiar with Fasm and most the problems I've had with the code was related to the different syntax.

Weel, that's all for now, thanks,

El_Choni

Posted: Tue Apr 15, 2003 8:30 pm
by BackupUser
Restored from previous forum. Originally posted by Amiga5k.
I will post an example tonight and put it in the SDK if I got some time.
SDK? Where could one download such an item?

Russell



***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***

Posted: Tue Apr 15, 2003 9:29 pm
by BackupUser
Restored from previous forum. Originally posted by Berikco.
Originally posted by Amiga5k
I will post an example tonight and put it in the SDK if I got some time.
SDK? Where could one download such an item?

Russell



***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***
The SDK for making userlibs is in your purebasic dir

Regards,

Berikco

http://users.pandora.be/berikco/purebasic.htm

Posted: Wed Apr 16, 2003 10:57 pm
by BackupUser
Restored from previous forum. Originally posted by Amiga5k.

Oh... THAT sdk Very good. Carry on.

Russell

***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***

Posted: Thu Apr 17, 2003 8:18 am
by BackupUser
Restored from previous forum. Originally posted by fred.

El_Choni:

It's _PB_ImageDecoder_Register@4 (C stdcall convention). Should work then.

Fred - AlphaSND

Posted: Thu Apr 17, 2003 7:53 pm
by BackupUser
Restored from previous forum. Originally posted by Amiga5k.
I'm thinking of going back to Nasm, I'm not familiar with Fasm and most the problems I've had with the code was related to the different syntax.
Just out of curiosity, why did we change from Nasm to Fasm? (Spasm is next, I think :)) Is Nasm not multiplatform?

Russell

***Commodore 64 - Over one million cycles per second, 16 vibrant colors, 3 incredible audio channels and 38,911 Basic Bytes Free! Who could ask for anything more?***

Posted: Thu Apr 17, 2003 10:33 pm
by BackupUser
Restored from previous forum. Originally posted by Kale.

viewtopic.php?t=2395

--Kale

In love with PureBasic! :)

Posted: Wed Apr 23, 2003 10:06 am
by BackupUser
Restored from previous forum. Originally posted by El_Choni.

Thanks, Fred! It works now, and I'll be able to code some plugins :)

El_Choni