Search found 3270 matches

by BasicCoder2
Feb 03, 2009 4:43
Forum: Tips and Tricks
Topic: very simple color picker
Replies: 2
Views: 1120

Maybe display the color as a block to see what you have picked? Function GetColor(x As Integer,y As Integer) As Uinteger If x<0 Or x>254 Then Return 0 If y<0 Or y>254 Then Return 0 Dim a As Single = (y/127.0)*3.14159 Dim w As Single = x/254.0 Dim c As Single = iif(w<0.5,255.0*w,2...
by BasicCoder2
Jan 26, 2009 3:06
Forum: Beginners
Topic: How to create animation with two sprites ?
Replies: 10
Views: 1637

Re: How to create animation with two sprites ?

Hello , I want to create a animation with two sprites that have a different move speed. I try that code: Screen 20, 32 ,4,1 :cls dim a As integer dim sprite1 As Any ptr = ImageCreate( 20, 20 ) bload "sprite1.bmp", sprite1 dim sprite2 As Any ptr = ImageCreate( 20, 20 ) bloa...
by BasicCoder2
Jan 16, 2009 8:07
Forum: General
Topic: for next behavior
Replies: 7
Views: 947

KristopherWindsor wrote:Ubyte isn't necessarily faster. ;)



I did think that 32 bit integers arrays would be faster. But it
is how best to store color images for processing. At the
moment I convert them to 3 ubyte arrays red() grn() blu()
by BasicCoder2
Jan 16, 2009 7:58
Forum: General
Topic: for next behavior
Replies: 7
Views: 947

At the end of a for-loop, the for variable is incremented, and the loop is exited if the value is greater than the limit. In the case of a ubyte, when it reaches 255, if you increment it, it goes to zero, hence it never exceeds 255. A quick and nasty fix would be to put this immedaietely before the...
by BasicCoder2
Jan 16, 2009 1:59
Forum: General
Topic: for next behavior
Replies: 7
Views: 947

for next behavior

In the code below when I change, dim integer r,g,b to dim ubyte r,g,b the for next loop, loops continually. Is this normal behavior? dim as integer r,g,b 'dim as ubyte r,g,b screen 18,32 locate 20,1 print "start" for r = 0 to 255 g = r b = 0 line (r,0)-(r,30),rgb(r,g,b&...
by BasicCoder2
Jan 13, 2009 20:07
Forum: General
Topic: PICTURE VIEWER
Replies: 11
Views: 1903

Re: PICTURE VIEWER

Hi all I need to make a simple picture viewer that will show two images on screen . Those images will be chosed by reading a text file that will contain the names of those 2 image files . My question is which FB commands apply to dispalying images . Thanks RealInfo It is unclear how much programmin...
by BasicCoder2
Jan 10, 2009 5:27
Forum: Community Discussion
Topic: Alternative Logo Set for FreeBASIC
Replies: 16
Views: 3792

technoweasel wrote:What does a horse have to do with BASIC?


I assumed it was making reference to being free and powerful like an Australian brumby.
by BasicCoder2
Jan 08, 2009 23:21
Forum: Projects
Topic: spinifex
Replies: 6
Views: 1257

.
by BasicCoder2
Jan 08, 2009 0:29
Forum: Projects
Topic: spinifex
Replies: 6
Views: 1257

spinifex

Neat :) Do you have any pictures of that effect happening in real life? I did an internet search but couldn't find any aerial views that were close enough to really allow the effect to be seen. The Google Earth views were also not of sufficient resolution. http://natureposters.org/poster-56924-1132...
by BasicCoder2
Jan 06, 2009 23:38
Forum: Projects
Topic: spinifex
Replies: 6
Views: 1257

spinifex

'this is inspired by the growth patterns 'of the Australian spinifex grass. screen 18,8 dim as integer v,v2 dim as integer xp,yp,a,b dim as ubyte r1,g1,b1 dim as integer plant for i as integer = 0 to 127 palette i,i*2,i*2,i*2 next i palette 255,0,255,0 'green plant palette 254,255,0,0 'red plant 'f...
by BasicCoder2
Jan 04, 2009 13:57
Forum: General
Topic: D.J.Peters webcam problem
Replies: 11
Views: 1815

i was on the right way :-) now i get the YUV2 format decoded but there is an other problem if you select an compressed format on the dialog it will not return the width and height in pixels (anymore) but this can be an bug in my old fb video class or changes in the curent version of fb. Joshy Well ...
by BasicCoder2
Jan 02, 2009 8:24
Forum: General
Topic: D.J.Peters webcam problem
Replies: 11
Views: 1815

D.J.Peters wrote:it's a YUY 16 bit pixelformat

http://www.fourcc.org/yuv.php#YUY2


Too bad I guess. That is probably why it didn't work with the lew code as well.

John
by BasicCoder2
Jan 01, 2009 22:48
Forum: General
Topic: D.J.Peters webcam problem
Replies: 11
Views: 1815

1.) 2.) if the cam dosn't support a clean RGB format post the result from print hex(biHeader.biCompression) Joshy When I inserted, print hex(biHeader.biCompression) in test06.bas it would not compile: Variable not declared, bHeader in print hex(biHeader.biCompression) Implicit variable allocation, ...
by BasicCoder2
Jan 01, 2009 22:40
Forum: General
Topic: D.J.Peters webcam problem
Replies: 11
Views: 1815

1.) use the capture dialog to select an uncompressed RGB format "test06.bas" http://www.freebasic.net/forum/viewtopic.php?t=8229 2.) if the cam dosn't support a clean RGB format post the result from print hex(biHeader.biCompression) Joshy Joshy, I have been busy with other things so it has been som...
by BasicCoder2
Jan 01, 2009 7:09
Forum: General
Topic: D.J.Peters webcam problem
Replies: 11
Views: 1815

D.J.Peters webcam problem

Hi, Recently I updated to a laptop running Vista. A routine that I used, written by the clever knowledgable D.J.Peters for accessing a webcam, doesn't work, displaying the text, "error: sorry this example needs RGB !" which is given when biHeader.biCompression<>0. The webcam is built into the top of...

Go to advanced search