Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Paint help
#1
Ok a couple Qs:

1. How do you make animated gifs?
2. How do you load .bmps into QB?

Ok...Well please answer then if you can. Big Grin
i]"But...it was so beautifully done"[/i]
Reply
#2
Code:
Type BitmapFileHeader

  fType As String * 2
  fSize As Long
  reserve As Integer
  reserve2 As Integer
  fOffset As Long

End Type

Type BitmapInfoHeader

  iSize As Long
  iwidth As Long
  iheight As Long
  iPlanes As Integer
  iBitCount As Integer
  iCompression As Long
  iSizeImage As Long
  iXPels As Long
  iYPels As Long
  iUsedClr As Long
  iImptntClr As Long

End Type

Type RGBQuad

  b As String * 1
  g As String * 1
  r As String * 1
  p As String * 1

End Type

Const tilesize% = 16
Const xtiles% = 14
Const ytiles% = 7

Dim fileheader As BitmapFileHeader
Dim infoheader As BitmapInfoHeader
Dim colors(255) As RGBQuad
Dim colortable&(255)

'**********

Screen 13

Open "pics\n_grass1.bmp" For Binary As #1
  Get #1, , fileheader
  GET #1, , infoheader

  lineofbmp$ = Space$(infoheader.iwidth)

  For snatchcolor% = 0 To 255
    Get #1, , colors(snatchcolor%)

    colortable&(snatchcolor%) = (((ASC(colors(snatchcolor%).b) \ 4) * 65536) + ((ASC(colors(snatchcolor%).g) \ 4) * 256&) + (ASC(colors(snatchcolor%).r) \ 4))

  Next

  Palette Using colortable&

  DEF SEG = &HA000

  For y% = infoheader.iheight - 1 To 0 Step -1
    GET #1, , lineofbmp$


    For x% = 0 TO infoheader.iwidth - 1
      Poke y% * 320& + x%, Asc(Mid$(lineofbmp$, x% + 1, 1))

    Next

  Next

Close

Def Seg


the image data is stored in a .bmp upside-down, so youll have to figure out the logic to do this


oh, to load a bmp into an array in fb you ask? (lol)

dim holdbmp((bmpx * bmpy) \ 2 + 2)

bload "whatever.bmp", holdbmp(0)


i know, i know. hater. ;p;p;p;p;p
Reply
#3
Smile In FB you can also just do this, then DIM and GET it..

BLOAD "Name.BMP"


Animated GIFs, you need a animator thing... Charater Maker is recomended by Josiah.. :wink: ..
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#4
What about Paint Shop 8?

Ummm...thanks for the code....how do I display it? Big Grin


1 more thing just for fun....anyone know how to load a .png file into your QB program?
i]"But...it was so beautifully done"[/i]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)