Code: Select all
''bluatigro 19 jun 2017
''test big bmp
dim as any ptr img4k = imagecreate( 3840 , 2160 )
bsave "bmp\big.bmp" , img4k
Code: Select all
''bluatigro 19 jun 2017
''test big bmp
dim as any ptr img4k = imagecreate( 3840 , 2160 )
bsave "bmp\big.bmp" , img4k
Code: Select all
''bluatigro 19 jun 2017
''test big bmp
screen 20 , 32
dim as any ptr img4k = imagecreate( 3840 , 2160 )
bsave "bmp\big.bmp" , img4k
Code: Select all
#Include "file.bi"
'use for texturing colours within range 0 to 255
function map(a as single,b as single,x as single,c as single,d as single) as Single
Return ((d)-(c))*((x)-(a))/((b)-(a))+(c)
End function
dim as long wide,high
wide=800
high=600
ReDim as ulong a((wide+1)*(high+1)) 'A proposed 32 bit bitmap
'set the basic information so a() will be a bitmap.
a(0)=7 'must be 7
a(1)=4 'size of ulong for 32 bit colour
a(2)=wide 'width
a(3)=high 'height
a(4)=a(1)*a(2) 'pitch
a(5)=0
a(6)=0
a(7)=0
'add some texture to the array, starting at element 8
for n as long=8 to ubound(a)
Var r=map(8,UBound(a),n,0,255)
Var g=map(8,UBound(a),n,255,0)
Var b=iif(r>g,0,255)
a(n)=rgb(r,g,b) 'give these elemnts a ulong colour.
next n
Screen 20,32
BSave("screen.bmp",@a(0))
If FileExists ("screen.bmp") Then BLoad "screen.bmp":Kill "screen.bmp" Else Print "ERROR"
Sleep