Author Topic: PB 5.60 beta 8 on the place  (Read 1610 times)

0 Members and 1 Guest are viewing this topic.

Offline ~Ar-S~

  • C= 64
  • **
  • Posts: 50
  • Karma: 26
  • Demo RuleZ
    • View Profile
PB 5.60 beta 8 on the place
« on: January 28, 2017 »
PB 5.60 beta 2 is out..
Lot's of interresting news !

- Added: GIF decoder support
- Added: SetImageFrame(), GetImageFrame(), ImageFrameCount(), AddImageFrame(), RemoveImageFrame()
- Added: UserAgent support to ReceiveHTTPMemory(), ReceiveHTTPFile() and GetHTTPHeaders()
- Added: #PB_Http_NoRedirect support for GetHTTPHeaders()
- Added: "Joe Doe <>" email format support for SendMail()
- Added: HTTPProxy() for Http related commands proxy support
- Added: Compression level support for CreatePack() and CompressMemory()
- Added: Large icons and text support to ToolBar library
- Added: GetUserDirectory() to get user specific directories
- Added: more flexibility to Base64Decoder to handle non padded input
- Added: Base64Encoder() and Base64Decoder() which takes string as input/output for easier use
- Added: color constants like #Black, #Blue etc. for all OS
- Added: Event() to get the current event (mainly useful from callback)
- Added: #PB_Canvas_Container support to have a container behaviour for canvas
- Added: #PB_EventType_Resize support for PanelGadget(), ContainerGadget(), CanvasGadget() and ScrollAreaGadget()
- Added: #PB_ListIcon_ColumnCount to GetGadgetAttribute() for ListIconGadget() to get the column count
- Added: #PB_All support to RemoveGadgetColumn() to remove all the columns
- Added: (IDE) templates are now saved when created to prevent lost if the IDE is not properly closed
- Added: (IDE) jump to a procedure now automatically unfold it if it was folded
- Added: (IDE) new specific popup menu for file tab to ease source file management
- Added: (IDE) find previous (reverse find)

- Changed: ToolBar, Menu and StatusBar are now excluded from inner window area for all OS
- Changed: MenuHeight(), StatusBarHeight() and ToolBarHeight() are now deprecated (all returns 0)
- Changed: renamed Base64Encoder() to Base64EncoderBuffer()
- Changed: renamed Base64Decoder() to Base64DecoderBuffer()
- Changed: removed 'define.b' syntax to change default type as it could create hard to find bugs.

Here is an exemple to use GIF picture with "Frame" included lib

EnJoY  :||

Code: [Select]
; Ar-S // PB 5.60 beta1
; Gif viewer and animate with frame



Declare CatchImage_Net(Adr$)
Declare Count()
Declare ChangeFrame()
Declare exit()

Global Nbrframe

adr$ = ""
Image=CatchImage_Net(adr$)  ;Modifie cela par le chemin de ton image

If Image <> 0
  NbrFrame = ImageFrameCount(#IMAGEGIF)
  Debug "erreur de chargement de l'image"

Procedure CatchImage_Net(Adr$)
  Protected image
  ; By Ar-S
  *Buffer = ReceiveHTTPMemory(Adr$)
  If *Buffer
    Image = CatchImage(#IMAGEGIF, *Buffer, MemorySize(*Buffer) )
    ProcedureReturn Image
    ProcedureReturn #False   
;;; End OR

Procedure Count()
  ProcedureReturn NbrFrame

Procedure ChangeFrame()
  Static Frame
  Frame + 1
  If Frame = NbrFrame
    Frame = 0
  Debug "Frame : " + Frame
  ; Affichage
  SetImageFrame(#IMAGEGIF, Frame)
  SetGadgetState(#GAD_IMAGE, ImageID(#IMAGEGIF))

Procedure exit()

If OpenWindow(#WIN, 0, 0, 150, 113, "Gif...", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
  BindEvent(#PB_Event_CloseWindow, @exit())
  BindEvent(#PB_Event_Timer, @ChangeFrame())
  Repeat : WaitWindowEvent() : ForEver

« Last Edit: March 01, 2017 by ~Ar-S~ »
~ Ar-S ~

Offline KrazyK

  • Amiga 1200
  • ****
  • Posts: 307
  • Karma: 125
    • View Profile
    • KrazyK Remakes
Re: PB 5.60 beta 1 on the place
« Reply #1 on: January 28, 2017 »
Nice, I'll take a peek at this later.
Challenge Trophies Won:

Offline inc.

  • Contact me @ skype: a5recordings
  • Amiga 1200
  • ****
  • Posts: 266
  • Karma: 23
  • I SPEAK ENGLISH & GERMAN as good as i can :D
    • View Profile
Re: PB 5.60 beta 1 on the place
« Reply #2 on: January 28, 2017 »
I wonder, who need gif Animation?  I prefer png Sprite sheet.
But still working with 5.30 and 5.43lts.  Too many Updates and new Versions in a really short time. And older SC need fixed again because newer PB versions can't execute commands from older PB releases.  That's why i normally switch only once in a year to a newer Version. Looking forward
currently coding in PureBasic: GLSL Shader Maker & Editor Tool for further Demo coding usage

Offline ~Ar-S~

  • C= 64
  • **
  • Posts: 50
  • Karma: 26
  • Demo RuleZ
    • View Profile
Re: PB 5.60 beta 2 on the place
« Reply #3 on: February 03, 2017 »
Beta 2 out.
Note that the 5.4x are LTS but 5.50 and more are none LTS so with new functions and with frequently updates.

who need gif Animation
It's always fun to use but the most important is the ImageFrame() lib. We can easily make an animation by adding frames to a sprite.
It's much easier than before.
~ Ar-S ~