Page 1 of 1

create Toolbar images

Posted: Thu Aug 07, 2003 4:28 pm
by RJP Computing
This is a stupid question, but I just can't find a good way. How do you create the single *.bmp file with the toolbar images side by side?

I need custom toolbar icons not included in the standard toolbar images.

thanks for the help

Posted: Thu Aug 07, 2003 7:01 pm
by Flype
hello,

if you speak about toolbar provided by the PureTools_I library,
personally i use Paint :lol: If i need 5 images in 32x32, i set in the menu -> images -> attributes -> 160 x 32 and then i just play with copy/paste or i draw all pics.

Posted: Thu Aug 07, 2003 8:15 pm
by RJP Computing
yes that is what I mean. Thanks. I was just hoping there was some cool program that could combine 5 16x16 BMP into that image. No big deal. That sounds doable.

Posted: Thu Aug 07, 2003 8:38 pm
by Flype
it's easy do make a little program to stick multiple images in one...
hmmm, let me think a little...
Well, this piece of code does the work ;-)

Code: Select all

dir.s = "C:\DEV\PureBasic\Examples\Sources - Advanced\Waponez II\Data\"

CreateImage( 0, 6 * 50, 36 )
ImageOutput()

For i=1 To 6
  LoadImage( i, dir+"Ennemy_3_" + Str( i )+ ".bmp" )
  UseImage( 0 )
  StartDrawing( ImageOutput() )
    DrawImage( UseImage( i ), (i-1) * 50, 0 )
  StopDrawing()
Next

;OpenWindow(0,200,200,300,200,0,"")
;StartDrawing( WindowOutput() )
;  DrawImage( UseImage( 0 ), 0, 0 )
;StopDrawing()
;Delay( 5000 )

file.s = SaveFileRequester( "Save Images...", "WaponezSprites.bmp", "Bitmap|*.bmp", 0 )
If file <> ""
  SaveImage( 0, file, #PB_ImagePlugin_BMP )
  MessageRequester( "Report", "Sprites Saved !", 0 )
EndIf

Posted: Thu Aug 07, 2003 10:32 pm
by RJP Computing
Flype wrote:it's easy do make a little program to stick multiple images in one...
hmmm, let me think a little...
Well, this piece of code does the work ;-)

Code: Select all

dir.s = "C:\DEV\PureBasic\Examples\Sources - Advanced\Waponez II\Data"

CreateImage( 0, 6 * 50, 36 )
ImageOutput()

For i=1 To 6
  LoadImage( i, dir+"Ennemy_3_" + Str( i )+ ".bmp" )
  UseImage( 0 )
  StartDrawing( ImageOutput() )
    DrawImage( UseImage( i ), (i-1) * 50, 0 )
  StopDrawing()
Next

;OpenWindow(0,200,200,300,200,0,"")
;StartDrawing( WindowOutput() )
;  DrawImage( UseImage( 0 ), 0, 0 )
;StopDrawing()
;Delay( 5000 )

file.s = SaveFileRequester( "Save Images...", "WaponezSprites.bmp", "Bitmap|*.bmp", 0 )
If file <> ""
  SaveImage( 0, file, #PB_ImagePlugin_BMP )
  MessageRequester( "Report", "Sprites Saved !", 0 )
EndIf
THAT IS AWSOME. 8O Duh I should of thought of making my own.

Thanks