Put Images into your Purebasic-Board-thread

Share your advanced PureBasic knowledge/code with the community.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Put Images into your Purebasic-Board-thread

Post by HeX0R »

Code updated for 5.20+

Whenever you try to get help here on a code-example, and your code-example needs an image to be loaded, its a little annoying for others when they try to test your code.
Most of the time, they won't have your used image and get an error.

This one will help.
You select an Image and this little script will create an usable pb-source-code for you. (its in the clipboard afterwards).

Have fun

Code: Select all

UseJPEGImageDecoder()
UsePNGImageDecoder()
File$ = OpenFileRequester("Select Image", "", "All (*.*)|*.*", 0)
If File$
  Size.l = FileSize(File$)
  If LoadImage(0, File$) = 0
    MessageRequester("Error", GetFilePart(File$) + " is no Image, or not supported!")
    End
  EndIf
  FreeImage(0)
  If ReadFile(0, File$) = 0
    MessageRequester("Error", "Not able to read '" + File$ + "' !")
    End
  EndIf
  *Buffer = AllocateMemory(Size)
  If *Buffer = 0
    MessageRequester("Error", "Could not allocate " + StrF(Size / 1024, 2) + "kb Memory!")
    End
  EndIf
  ReadData(0, *Buffer, Size)
  CloseFile(0)
 
  Select LCase(GetExtensionPart(File$))
    Case "jpg"
      HeaderInclude.s = "UseJPEGImageDecoder()" + #CRLF$
    Case "png"
      HeaderInclude.s = "UsePNGImageDecoder()" + #CRLF$
    Default
      HeaderInclude.s = ""
  EndSelect

  Header.s = HeaderInclude
  Header   + ";-----------Usage-Example-----------" + #CRLF$
  Header   + "If CatchImage(0, ?MyImage) And OpenWindow(0, 1, 1, ImageWidth(), ImageHeight(), 0, " + Chr(34) + Chr(34) + ") And CreateGadgetList(WindowID())" + #CRLF$
  Header   + "  ImageGadget(0, 1, 1, ImageWidth(), ImageHeight(), UseImage(0))" + #CRLF$
  Header   + "  Repeat" + #CRLF$
  Header   + "  Until WaitWindowEvent() = #WM_CLOSE" + #CRLF$
  Header   + "EndIf" + #CRLF$
  Header   + "End" + #CRLF$
  Header   + ";-----------------------------------" + #CRLF$
  Header   + #CRLF$
  Header   + "DataSection" + #CRLF$
  Header   + "  MyImage:" + #CRLF$
 
  Footer.s = "EndDataSection" + #CRLF$
 
  Length_Total.l = Len(Header) + Len(Footer)
  Length_Total + (Int(Size / 8) + 1) * 11
  Length_Total + (Int(Size / 4) + 1) * 11
  If Length_Total > 102400 And MessageRequester("Warning!!", "The Data in the ClipBoard will be very big (" + StrF(Length_Total / 1024, 2) + " kB)" + Chr(10) + "Will you go on anyway ?", #PB_MessageRequester_YesNo) <> 6
    FreeMemory(*Buffer)
    End
  EndIf
  OpenClipboard_(0)
  *Handle = GlobalAlloc_(#GMEM_MOVEABLE, Length_Total + 100)
  If *Handle = 0
    MessageRequester("Error", "Could not allocate Global Memory!")
    FreeMemory(*Buffer)
    CloseClipboard_()
    End
  EndIf
  *Out_Buffer = GlobalLock_(*Handle)
  If *Out_Buffer = 0
    MessageRequester("Error", "Could not lock Global Memory!")
    CloseClipboard_()
    FreeMemory(*Buffer)
    End
  EndIf
  PokeS(*Out_Buffer, Header)
  Mem_Pointer.l = Len(Header)

  For p = 0 To Size Step 32
    Line.s = "  Data.l "
    For i = 0 To 7
      If (p + i * 4) > Size
        Break
      EndIf
      Long.l = PeekL(*Buffer + p + (i * 4))
      Line + "$" + RSet(Hex(Long), 8, "0") + ", "
    Next i
    Line = Left(Line, Len(Line) - 2) + #CRLF$
    PokeS(*Out_Buffer + Mem_Pointer, Line)
    Mem_Pointer + Len(Line)
  Next p
  PokeS(*Out_Buffer + Mem_Pointer, Footer)
  Mem_Pointer + Len(Footer)
  PokeB(*Out_Buffer + Mem_Pointer, 0)
  GlobalUnlock_(*Handle)
  EmptyClipboard_()
  SetClipboardData_(#CF_TEXT, *Handle)
  FreeMemory(*Buffer)
  CloseClipboard_()
  MessageRequester("O.K.", "Data is in ClipBoard and ready to rumble!")
EndIf

End


Here is an example of what it will produce:

Code: Select all

;-----------Usage-Example-----------
If CatchImage(0, ?MyImage) And OpenWindow(0, 1, 1, ImageWidth(0), ImageHeight(0), "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
  ImageGadget(0, 1, 1, ImageWidth(0), ImageHeight(0), ImageID(0))
  Repeat
  Until WaitWindowEvent() = #WM_CLOSE
EndIf
End
;-----------------------------------

DataSection
  MyImage:
  Data.l $00010000, $20200001, $00000000, $08A80000, $00160000, $00280000, $00200000, $00400000
  Data.l $00010000, $00000008, $04800000, $00000000, $00000000, $01000000, $00000000, $00000000
  Data.l $00000000, $80000080, $80000000, $00800080, $00800000, $80800080, $C0C00000, $DCC000C0
  Data.l $CAF000C0, $FFCC00A6, $FF9900FF, $FF6600FF, $FF3300FF, $CCFF00FF, $CCCC00FF, $CC9900FF
  Data.l $CC6600FF, $CC3300FF, $CC0000FF, $99FF00FF, $99CC00FF, $999900FF, $996600FF, $993300FF
  Data.l $990000FF, $66FF00FF, $66CC00FF, $669900FF, $666600FF, $663300FF, $660000FF, $33FF00FF
  Data.l $33CC00FF, $339900FF, $336600FF, $333300FF, $330000FF, $00CC00FF, $009900FF, $006600FF
  Data.l $003300FF, $FFFF00FF, $FFCC00CC, $FF9900CC, $FF6600CC, $FF6600CC, $FF3300CC, $FF0000CC
  Data.l $CCFF00CC, $CCCC00CC, $CC9900CC, $CC6600CC, $CC3300CC, $CC0000CC, $99FF00CC, $99CC00CC
  Data.l $999900CC, $996600CC, $993300CC, $990000CC, $66FF00CC, $66CC00CC, $669900CC, $666600CC
  Data.l $663300CC, $660000CC, $33FF00CC, $33CC00CC, $339900CC, $336600CC, $333300CC, $330000CC
  Data.l $00FF00CC, $00CC00CC, $009900CC, $006600CC, $003300CC, $000000CC, $FFFF00CC, $FFCC0099
  Data.l $FF990099, $FF660099, $FF330099, $FF000099, $CCFF0099, $CCCC0099, $CC990099, $CC660099
  Data.l $CC330099, $CC000099, $99FF0099, $99CC0099, $99990099, $99660099, $99330099, $99000099
  Data.l $66FF0099, $66CC0099, $66990099, $66660099, $66330099, $66000099, $33FF0099, $33CC0099
  Data.l $33990099, $33660099, $33330099, $33000099, $00FF0099, $00CC0099, $00990099, $00660099
  Data.l $00330099, $00000099, $FFFF0099, $FFCC0066, $FF990066, $FF660066, $FF330066, $FF000066
  Data.l $CCFF0066, $CCCC0066, $CC990066, $CC660066, $CC330066, $CC000066, $99FF0066, $99CC0066
  Data.l $99990066, $99660066, $99330066, $99000066, $66FF0066, $66CC0066, $66990066, $66660066
  Data.l $66330066, $66000066, $33FF0066, $33CC0066, $33990066, $33660066, $33330066, $33000066
  Data.l $00FF0066, $00CC0066, $00990066, $00660066, $00330066, $00000066, $FFFF0066, $FFCC0033
  Data.l $FF990033, $FF660033, $FF330033, $FF000033, $CCFF0033, $CCCC0033, $CC990033, $CC660033
  Data.l $CC330033, $CC000033, $99FF0033, $99CC0033, $99990033, $99660033, $99330033, $99000033
  Data.l $66FF0033, $66CC0033, $66990033, $66660033, $66330033, $66000033, $33FF0033, $33CC0033
  Data.l $33990033, $33660033, $33330033, $33000033, $00FF0033, $00CC0033, $00990033, $00660033
  Data.l $00330033, $00000033, $FFCC0033, $FF990000, $FF660000, $FF330000, $CCFF0000, $CCCC0000
  Data.l $CC990000, $CC660000, $CC330000, $CC000000, $99FF0000, $99CC0000, $99990000, $99660000
  Data.l $99330000, $99000000, $66FF0000, $66CC0000, $66990000, $66660000, $66000000, $66330000
  Data.l $33FF0000, $33CC0000, $33990000, $33660000, $33330000, $33000000, $00CC0000, $00990000
  Data.l $00660000, $00330000, $00000000, $000000DD, $000000BB, $000000AA, $00000088, $00000077
  Data.l $00000055, $00000044, $DD000022, $BB000000, $AA000000, $88000000, $77000000, $55000000
  Data.l $44000000, $22000000, $DDDD0000, $555500DD, $77770055, $77770077, $44440077, $22220044
  Data.l $11110022, $00770011, $00550000, $00440000, $00220000, $FBF00000, $A0A400FF, $808000A0
  Data.l $00000080, $FF0000FF, $FF000000, $00FF00FF, $00FF0000, $FFFF00FF, $FFFF0000, $EFEF00FF
  Data.l $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $5DEFEFEF
  Data.l $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5DEFEF5D
  Data.l $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $5DEFEF5D
  Data.l $00000000, $0000E8E8, $00000000, $00000000, $00000000, $E8000000, $0000E8E8, $5DEFEF5D
  Data.l $E8000000, $0000FAFA, $00000000, $00000000, $00000000, $E8000000, $0000E8FA, $5DEFEF5D
  Data.l $FAE8E8E8, $0000E80C, $00000000, $00000000, $00000000, $E8E80000, $E8E80CFA, $5DEFEF5D
  Data.l $FAFAFAE8, $00E8E80C, $00000000, $00000000, $00000000, $FAE8E800, $FA0CE80C, $5DEFEF5D
  Data.l $E8E8E800, $E8E80CFA, $00000000, $00000000, $00000000, $0CFAE8E8, $000000E8, $5DEFEF5D
  Data.l $00000000, $E8FAFAE8, $E80000E8, $E800E800, $E8000000, $E8FAFAE8, $00000000, $5DEFEF5D
  Data.l $00000000, $FAFAE800, $E800E8E8, $FAE8FAE8, $E8E800E8, $E8E8FAFA, $000000E8, $5DEFEF5D
  Data.l $00000000, $FAE80000, $0000E8FA, $E8FAE8FA, $FAE80CFA, $E8E8E8FA, $000000E8, $5DEFEF5D
  Data.l $00000000, $E8000000, $E80000E8, $0CFAFAE8, $E8FA0CFA, $E8E8E8E8, $000000E8, $5DEFEF5D
  Data.l $00000000, $00000000, $E8000000, $FAE8FAFA, $E8FA0C0C, $E8E8E8E8, $000000E8, $5DEFEF5D
  Data.l $00000000, $00000000, $0000E8E8, $E8E8E8E8, $E8FAFA0C, $E8E8E8E8, $00000000, $5DEFEF5D
  Data.l $00000000, $E8000000, $E8E8FAFA, $E800E8E8, $FAFAE8FA, $E8E8E8E8, $00E8E8E8, $5DEFEF5D
  Data.l $00000000, $FAE80000, $FAFAFAFA, $FA0000E8, $FAFAFA0C, $E8E8E8FA, $00E8E8E8, $5DEFEF5D
  Data.l $00000000, $FAE80000, $E8E8E80C, $0C0000E8, $FAFAFA0C, $FAE8E8FA, $0000E8E8, $5DEFEF5D
  Data.l $00000000, $FAE80000, $0000E8E8, $000C0C00, $FAFA0000, $E8E8E8FA, $000000E8, $5DEFEF5D
  Data.l $00000000, $FAE80000, $000000E8, $000CFA00, $FA000000, $0000E8FA, $00000000, $5DEFEF5D
  Data.l $00000000, $E8E80000, $000000FA, $000CFAFA, $E8000000, $0000E8E8, $00000000, $5DEFEF5D
  Data.l $00000000, $E8E80000, $FAFAFAFA, $0C0C0C0C, $E8FAFA0C, $0000E8E8, $00000000, $5DEFEF5D
  Data.l $00000000, $E8E80000, $0CFAFAFA, $0CFFFF0C, $E8FAFA0C, $0000E8FA, $00000000, $5DEFEF5D
  Data.l $00000000, $E8E8E800, $0CFAE8E8, $0CFFFF0C, $E8FAFA0C, $00E8E8E8, $00000000, $5DEFEF5D
  Data.l $00000000, $E8E8E8E8, $FAE8E8FA, $0C0C0C0C, $FAE8E8FA, $E8E8FAE8, $00000000, $5DEFEF5D
  Data.l $E8000000, $E80CFAE8, $E8E8FAE8, $E8E8E8E8, $FAE8E8E8, $FA0CE8E8, $00E8E8E8, $5DEFEF5D
  Data.l $E8E8E8E8, $00E80CFA, $E8E8FAE8, $E8E8FAFA, $E8E8E8FA, $0CE80000, $E8FAFAFA, $5DEFEF5D
  Data.l $FAFAFAE8, $0000E80C, $E8E8E8E8, $E8E8FAE8, $E8E8E8E8, $E8000000, $E80C0CE8, $5DEFEF5D
  Data.l $FAE8E800, $000000FF, $E8E80000, $E8E8E8E8, $0000E8E8, $E8000000, $00E8FFFA, $5DEFEF5D
  Data.l $0CE80000, $0000000C, $00000000, $00000000, $00000000, $E8000000, $00000CFA, $5DEFEF5D
  Data.l $E8000000, $00000000, $00000000, $00000000, $00000000, $00000000, $000000E8, $5DEFEF5D
  Data.l $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $5D5D5D5D, $EFEFEF5D
  Data.l $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $EFEFEFEF, $0000EFEF
  Data.l $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000
  Data.l $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000
  Data.l $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000
  Data.l $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000, $00000000
EndDataSection
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: Put Images into your Purebasic-Board-thread

Post by NoahPhense »

Very nice.. I will find a use for this..

- np
Tommeh
Enthusiast
Enthusiast
Posts: 149
Joined: Sun Aug 29, 2004 2:25 pm
Location: United Kingdom

Post by Tommeh »

Wow HeXOR, that is very very usfull... Thanks a bunch :D

Just out of curiosity, would it be possible to store it in binary format?

Thanks for the code... will look into it more later :)
Tommeh
Enthusiast
Enthusiast
Posts: 149
Joined: Sun Aug 29, 2004 2:25 pm
Location: United Kingdom

Post by Tommeh »

I tried this but of course didnt work :p

Change:

Line + "%" + RSet(Bin(Long), 8, "0") + ", "

From:

Line + "$" + RSet(Hex(Long), 8, "0") + ", "
El_Choni
TailBite Expert
TailBite Expert
Posts: 1007
Joined: Fri Apr 25, 2003 6:09 pm
Location: Spain

Post by El_Choni »

Shouldn't it be?:

Code: Select all

 Line + "%" + RSet(Bin(Long), 32, "0") + ", " 
El_Choni
Tommeh
Enthusiast
Enthusiast
Posts: 149
Joined: Sun Aug 29, 2004 2:25 pm
Location: United Kingdom

Post by Tommeh »

Yeah ;)

But of course thats too big for the clipboard :(
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

Tommeh wrote:Yeah ;)

But of course thats too big for the clipboard :(
I blew up PB by pasting 5mbs into the IDE.. ;)

- np
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Put Images into your Purebasic-Board-thread

Post by PB »

> its a little annoying for others when they try to test your code.
> Most of the time, they won't have your used image and get an error

That's why my examples always link to the example images and icons in
PureBasic's folders, so they're guaranteed to be there for the code to load.
Makes it easier for others to just copy-and-paste my code and know that
it'll compile without needing changes. See my reply here for an example:

viewtopic.php?t=14238
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

and can use compression too (*.BMP) :wink:

Code: Select all

#GMEM_MOVEABLE  = $02 

UseJPEGImageDecoder() 
UsePNGImageDecoder() 
File$ = OpenFileRequester("Select Image", "", "All (*.*)|*.*", 0) 
If File$ 
  Size.l = FileSize(File$) 
  If LoadImage(0, File$) = 0 
    MessageRequester("Error", GetFilePart(File$) + " is no Image, or not supported!") 
    End 
  EndIf 
  FreeImage(0) 
  If ReadFile(0, File$) = 0 
    MessageRequester("Error", "Not able to read '" + File$ + "' !") 
    End 
  EndIf 
  *Buffer = AllocateMemory(Size) 
  If *Buffer = 0 
    MessageRequester("Error", "Could not allocate " + StrF(Size / 1024, 2) + "kb Memory!") 
    End 
  EndIf 
  ReadData(*Buffer, Size) 
  CloseFile(0)
  
  Select LCase(GetExtensionPart(File$)) 
    Case "jpg" 
      Header.s = "UseJPEGImageDecoder()" + #CRLF$ 
    Case "png" 
      Header.s = "UsePNGImageDecoder()" + #CRLF$ 
    Default 
      Header.s = "" 
  EndSelect 
  
  Header   + ";-----------Usage-Example-----------" + #CRLF$ 

  *BufferPack = AllocateMemory(Size+8)
  PackSize=PackMemory(*Buffer,*BufferPack,Size,9)
  If PackSize
    Debug "PackMemory successfull"
    FreeMemory(*Buffer)
    *Buffer=*BufferPack
    Header   + "*Buffer = AllocateMemory("+Str(Size)+")" + #CRLF$
    Header   + "UnpackMemory(?MyImage,*Buffer)" + #CRLF$
    Header   + "If CatchImage(0, *Buffer) And OpenWindow(0, 1, 1, ImageWidth(), ImageHeight(), 0, " + Chr(34) + Chr(34) + ") And CreateGadgetList(WindowID())" + #CRLF$ 
    Header   + "  ImageGadget(0, 1, 1, ImageWidth(), ImageHeight(), UseImage(0))" + #CRLF$ 
    Header   + "  Repeat" + #CRLF$ 
    Header   + "  Until WaitWindowEvent() = #WM_CLOSE" + #CRLF$ 
    Header   + "EndIf" + #CRLF$ 
    Header   + "FreeMemory(*Buffer)" + #CRLF$
    Size=PackSize
  Else
    Debug "PackMemory failed"
    Header   + "If CatchImage(0, ?MyImage) And OpenWindow(0, 1, 1, ImageWidth(), ImageHeight(), 0, " + Chr(34) + Chr(34) + ") And CreateGadgetList(WindowID())" + #CRLF$ 
    Header   + "  ImageGadget(0, 1, 1, ImageWidth(), ImageHeight(), UseImage(0))" + #CRLF$ 
    Header   + "  Repeat" + #CRLF$ 
    Header   + "  Until WaitWindowEvent() = #WM_CLOSE" + #CRLF$ 
    Header   + "EndIf" + #CRLF$ 
  EndIf
  
  Header   + "End" + #CRLF$ 
  Header   + ";-----------------------------------" + #CRLF$ 
  Header   + #CRLF$ 
  Header   + "DataSection" + #CRLF$ 
  Header   + "  MyImage:" + #CRLF$ 
  
  Footer.s = "EndDataSection" + #CRLF$ 
  
  Length_Total.l = Len(Header) + Len(Footer) 
  Length_Total + (Int(Size / 8) + 1) * 11 
  Length_Total + (Int(Size / 4) + 1) * 11 
  If Length_Total > 102400 And MessageRequester("Warning!!", "The Data in the ClipBoard will be very big (" + StrF(Length_Total / 1024, 2) + " kB)" + Chr(10) + "Will you go on anyway ?", #PB_MessageRequester_YesNo) <> 6 
    FreeMemory(*Buffer) 
    End 
  EndIf 
  OpenClipboard_(0) 
  *Handle = GlobalAlloc_(#GMEM_MOVEABLE, Length_Total + 100) 
  If *Handle = 0 
    MessageRequester("Error", "Could not allocate Global Memory!") 
    FreeMemory(*Buffer) 
    CloseClipboard_() 
    End 
  EndIf 
  *Out_Buffer = GlobalLock_(*Handle) 
  If *Out_Buffer = 0 
    MessageRequester("Error", "Could not lock Global Memory!") 
    CloseClipboard_() 
    FreeMemory(*Buffer) 
    End 
  EndIf 
  PokeS(*Out_Buffer, Header) 
  Mem_Pointer.l = Len(Header) 

  For p = 0 To Size Step 32 
    Line.s = "  Data.l " 
    For i = 0 To 7 
      If (p + i * 4) > Size 
        Break 
      EndIf 
      Long.l = PeekL(*Buffer + p + (i * 4)) 
      Line + "$" + RSet(Hex(Long), 8, "0") + ", " 
    Next i 
    Line = Left(Line, Len(Line) - 2) + #CRLF$ 
    PokeS(*Out_Buffer + Mem_Pointer, Line) 
    Mem_Pointer + Len(Line) 
  Next p 
  PokeS(*Out_Buffer + Mem_Pointer, Footer) 
  Mem_Pointer + Len(Footer) 
  PokeB(*Out_Buffer + Mem_Pointer, 0) 
  GlobalUnlock_(*Handle) 
  EmptyClipboard_() 
  SetClipboardData_(#CF_TEXT, *Handle) 
  FreeMemory(*Buffer) 
  CloseClipboard_() 
  MessageRequester("O.K.", "Data is in ClipBoard and ready to rumble!") 
EndIf 

End 
Example with 120x47 BMP file :

Code: Select all

;-----------Usage-Example-----------
*Buffer = AllocateMemory(816)
UnpackMemory(?MyImage,*Buffer)
If CatchImage(0, *Buffer) And OpenWindow(0, 1, 1, ImageWidth(), ImageHeight(), 0, "") And CreateGadgetList(WindowID())
  ImageGadget(0, 1, 1, ImageWidth(), ImageHeight(), UseImage(0))
  Repeat
  Until WaitWindowEvent() = #WM_CLOSE
EndIf
FreeMemory(*Buffer)
End
;-----------------------------------

DataSection
  MyImage:
  Data.l $0330434A, $23600000, $A9B3EE79, $146920D0, $CA120819, $2F4AF008, $2453BC25, $86040201
  Data.l $3FE8B03B, $F0011805, $FA7E3041, $C08008FF, $FF0062FF, $E18495FB, $44D3C0CF, $122A2F82
  Data.l $473F0FFF, $003189C0, $9A27C89E, $24016108, $91A4C118, $B8B00B02, $5160F8F0, $043C8270
  Data.l $1361DC61, $8D0F8008, $267803C2, $0E8E4D89, $DC811372, $01359C04, $80B0A3A6, $51C21A40
  Data.l $E3088370, $188A2DA0, $6FC16605, $DAFE44D1, $8A1C1601, $C22AC412, $C20C085F, $01633838
  Data.l $0473A487, $5913085E, $3202F088, $414F008E, $C19C47D8, $058D0237, $45CF1461, $381CA10F
  Data.l $3F080115, $E0266107, $C0D841D0, $C239B060, $0C264178, $73F8804D, $6F059E04, $11618E11
  Data.l $A007B808, $28400BE0, $12463082, $F840A020, $0000C025, $00008910
EndDataSection
Last edited by ABBKlaus on Wed Mar 16, 2005 9:34 pm, edited 1 time in total.
User avatar
HeX0R
Addict
Addict
Posts: 1189
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Post by HeX0R »

I guess it should be

Code: Select all

    Header   + "FreeMemory(*Buffer)" + #CRLF$
instead of

Code: Select all

    Header   + "FreeMemory(*Buffer1)" + #CRLF$ 
    Header   + "FreeMemory(*Buffer2)" + #CRLF$
dagcrack
Addict
Addict
Posts: 1868
Joined: Sun Mar 07, 2004 8:47 am
Location: Argentina
Contact:

Post by dagcrack »

Whats with the character field from the RSet function? it wont work! which version of PB do I need?
ABBKlaus
Addict
Addict
Posts: 1143
Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany

Post by ABBKlaus »

@HeXOR ,

you are right :oops: (fixed)

@dagcrack ,

what do you mean ?
Whats with the character field from the RSet function? it wont work! which version of PB do I need?

Code: Select all

  Length_Total + (Int(Size / 32) + 1) * 287 ; 287 Chars per row for BIN is needed (32 Bytes)

Code: Select all

      Line + "%" + RSet(Bin(Long),32,"0") + ", " 
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

repost the code, and i'll make a library for ya..

- np
User avatar
Rings
Moderator
Moderator
Posts: 1435
Joined: Sat Apr 26, 2003 1:11 am

Post by Rings »

NoahPhense wrote:repost the code, and i'll make a library for ya..

- np
lol
SPAMINATOR NR.1
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Post by NoahPhense »

Rings wrote:
NoahPhense wrote:repost the code, and i'll make a library for ya..

- np
lol
I thought it was kinda funny.. :lol:
Post Reply