FB Wiki Pages that need work
-
- Posts: 385
- Joined: Oct 16, 2005 0:15
- Location: USA
- Contact:
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
i tried... i thought this would work....
Code: Select all
'' fb_GfxImageConvertRow( byval src as any ptr, byval src_bpp as integer, _
'' byval dst as any ptr, byval dst_bpp as integer, _
'' byval width as integer, byval isrgb as integer = 1 ) as void
Dim As uByte Ptr img1
Dim As uInteger Ptr img2
Dim As Integer rowCopy
Screen 13
img1 = ImageCreate( 20, 20, 4 ) '' fill it with red
Put( 20, 20), img1
Sleep
Screen 14, 32
img2 = ImageCreate( 20, 20, 0 )
For rowCopy = 0 To 19
imageconvertrow( _
img1 + rowCopy * 20 + 4, 8 , _
img2 + rowCopy * 20 + 1, 32, _
20 )
Next
Put( 20, 20 ), img2
Sleep
-
- Posts: 775
- Joined: Jul 01, 2005 18:45
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
cha0s@
Thanx curently i have no sourcecode of the runtimelibs but with your example i can renember on this helper sub.
Joshy
EDIT: sorry but your example won't work any idea what's are wrong?
This works on my box
Thanx curently i have no sourcecode of the runtimelibs but with your example i can renember on this helper sub.
Joshy
EDIT: sorry but your example won't work any idea what's are wrong?
This works on my box
Code: Select all
type pic8 field=1
as short w,h
as byte pixels(20*20)
end type
type pic32 field=1
as short w,h
as integer pixels(20*20)
end type
dim as pic8 image8
dim as pic32 image32
dim as integer x,y
image8.w =(20 shl 3) or 1
image8.h = 20
image32.w =(20 shl 3) or 4
image32.h = 20
for y=0 to 19
for x=0 to 19
image8.pixels (x+y*20)=rnd*255
next
next
screenres 640,480,8
put (0,0),@image8,pset
Sleep
imageconvertrow @image8.pixels(0) ,8, _
@image32.pixels(0),32,20*20
screenres 640,480,32
put (0,0),@image32,pset
sleep
Sleep
-
- Posts: 8586
- Joined: May 28, 2005 3:28
- Contact:
hello cha0s
what are differs is i convert the image before i switch to the new mode seams to be a bug in image creation (imagecreate) and i sugest to a new name of this useful helper sub.
"ImageConvert" all images are continues block of memory so the width param shold be changed to numofpixels.
Joshy
what are differs is i convert the image before i switch to the new mode seams to be a bug in image creation (imagecreate) and i sugest to a new name of this useful helper sub.
"ImageConvert" all images are continues block of memory so the width param shold be changed to numofpixels.
Code: Select all
imageconvert @image8.pixels(0) ,8, _
@image32.pixels(0),32,20*20
Joshy
I added the base pages for:
I will also add the other new keywords as well as content, and Links on the CatPg* pages. I've been having too much fun recompiling my old progs with fb.16 to finish it at the moment. Will do it soon, sorry.Antoni wrote: * __FB_OPTION_EXPLICIT__
* __FB_OPTION_ESCAPE__
* __FB_OPTION_DYNAMIC__
* __FB_OPTION_PRIVATE__
* __FB_OPTION_BYVAL__
No, seriously! All my programs compile and run. guidemo, atom smash, rigid bodies. The worst problem I get is "Function result was not explicitly set" warnings. fb.16 has been kind to me. ;)
I'm now going back and working on mkwiki (for posting wiki pages). It was pretty quick and dirty before. I think it could be handy tool, but I haven't looked at it in a month until now.
I'm now going back and working on mkwiki (for posting wiki pages). It was pretty quick and dirty before. I think it could be handy tool, but I haven't looked at it in a month until now.
Antoni wrote:We have undocumented keywords again!
* __FB_OPTION_EXPLICIT__
* __FB_OPTION_ESCAPE__
* __FB_OPTION_DYNAMIC__
* __FB_OPTION_PRIVATE__
* __FB_OPTION_BYVAL__
* __FB_OUT_EXE__
* __FB_OUT_DLL__
* __FB_OUT_LIB__
* __FB_OUT_OBJ__
* ERFN
* ERMN
Pages, added. Categories updated. ERFN, ERMN are incomplete. FB_OUT* need examples. I have not even looked at IMAGECONERTROW.
I will return to this when I can. In the meantime, anyone else who has the time, please look over these pages. You could
- report an error
- suggest an example
- make a correction
Please report here.
Thanks
-
- Site Admin
- Posts: 6323
- Joined: Jul 05, 2005 17:32
- Location: Manchester, Lancs
I've had a go at the ImageConvertRow page. But I think it could use a little more explanation.