Search found 130 matches
- Apr 07, 2016 20:16
- Forum: Sources, Examples, Tips and Tricks
- Topic: Downscaler/Upscale image
- Replies: 1
- Views: 1285
Downscaler/Upscale image
I use WinApi routines to load icons. If I request a resolution of, say 80x80, and there is an icon with size 256x256 available, then Windows does a pretty poor job of downscaling the images. I didn't bother trying to find a way to make Windows improve the quality (in case there is one) but had some ...
- Apr 07, 2016 5:01
- Forum: General
- Topic: How can I close this file (and only this one)?
- Replies: 18
- Views: 2631
Re: How can I close this file (and only this one)?
@Tourist Trap: Is there a reason you can't use a global variable to store the file number you used? If it's the case that your program is going to be opening files in an unpredictable way, there are a number of ways of dealing with this. Perhaps you could clarify? In fact I'm just pointing out the ...
- Apr 06, 2016 19:01
- Forum: General
- Topic: How can I close this file (and only this one)?
- Replies: 18
- Views: 2631
Re: How can I close this file (and only this one)?
Perhaps I misunderstood what was written above but the following seems dangerous: open ... as #freeFile() dim as long ff = freeFile()-1 close #ff As far as I'm aware, internally, there is an array of file handles. freeFile simply returns the smallest index into the array with an empty cell. So you c...
- Apr 06, 2016 9:02
- Forum: Windows
- Topic: HICON to FB.Image
- Replies: 2
- Views: 1979
Re: HICON to FB.Image
At last have an implementation which is OK ;-) It still doesn't account for all possibilities but I'll leave it for now: Sometimes icons don't specify the used colour depth. I could try to use external libraries to determine the colour depth (I don't want to do that) or look at the image format spec...
- Mar 31, 2016 15:38
- Forum: Windows
- Topic: [SOLVED] Why won't this video show???
- Replies: 12
- Views: 2443
Re: Why won't this video show???
EDIT: Previous answer was incomplete.
System: Win7, 64-bit
FBC 64-bit (1.05.0): No problem here as well. Also the sound plays in sync.
FBC 32-bit (1.05.0): No video here. Sounds plays well. One video flickers -- looks like a race condition --> dkl's answer.
System: Win7, 64-bit
FBC 64-bit (1.05.0): No problem here as well. Also the sound plays in sync.
FBC 32-bit (1.05.0): No video here. Sounds plays well. One video flickers -- looks like a race condition --> dkl's answer.
- Mar 31, 2016 15:32
- Forum: General
- Topic: Boolean? Or integer?
- Replies: 9
- Views: 1629
Re: Boolean? Or integer?
To all reading this: Do you prefer to write loop until cbool(unique = true) andalso (in <> "") since it implies that unique is a boolean variable? Or rather the following which is shorter (and requires no cbool() ): loop until unique andAlso (in <> "") I would probably rename uni...
- Mar 23, 2016 2:59
- Forum: Sources, Examples, Tips and Tricks
- Topic: a line :-)
- Replies: 43
- Views: 4613
Re: a line :-)
pros versus cons pros = Maximum speed in BASIC cons = The beauty of the algorithm are gone. Joshy #ifndef __ALINE_BI__ #define __ALINE_BI__ #define RGB16(r,g,b) ((r and &B11111000) shl 9) or ((g and &B11111100) shl 4) or ((b and &B11111000) shr 3) #macro aLine(_type_,_shift_,_px0_,_py0_...
- Mar 15, 2016 20:25
- Forum: Windows
- Topic: FB 64-bit gdiplus include problem
- Replies: 8
- Views: 2702
Re: FB 64-bit gdiplus include problem
Yes, including windows.bi beforehand works. So basically the problems boils down to that
isn't allowed.
Code: Select all
namespace XX
declare sub test()
#undef test
end namespace
- Mar 15, 2016 10:48
- Forum: Windows
- Topic: HICON to FB.Image
- Replies: 2
- Views: 1979
HICON to FB.Image
Hi, I'm trying to convert an icon, retrieved by extractIconEx() , to an FB.Image. However I cannot find an easy way of determining if the icon is 32-bit or lower. If the icon is lower than 32-bit, then the alpha channel is zero. If displayed with put (x,y),img,alpha , you won't see anything. Thus I ...
- Mar 15, 2016 10:03
- Forum: Beginners
- Topic: [Solved] Is this supposed to be allowed?
- Replies: 3
- Views: 950
Re: Is this supposed to be allowed?
Interesting. Although it seems like a dangerous coding style. A compiler flag disallowing such behaviour would be nice.
Thanks for clearing this up fxm.
Thanks for clearing this up fxm.
- Mar 15, 2016 9:59
- Forum: Beginners
- Topic: [Solved] String callocate/reallocate fails with FB64
- Replies: 3
- Views: 1116
Re: String callocate/reallocate fails with FB64
Thanks fxm!
- Mar 15, 2016 9:55
- Forum: Community Discussion
- Topic: [solved] Can you post your FPS result please ?
- Replies: 36
- Views: 7801
Re: [solved] Can you post your FPS result please ?
Really cool what can be done with just a few hundred lines of code! Joshy's code: I get a solid 60 fps (minimum 58 fps) on a (mobile) Nvidia GTX860M. On the Intel processor integrated HD Graphics 4600 I get a minimum of 10 fps, a maximum of 25 fps and an estimated median of 12 fps (other stuff, e.g....
- Mar 15, 2016 9:16
- Forum: Beginners
- Topic: [Solved] String callocate/reallocate fails with FB64
- Replies: 3
- Views: 1116
[Solved] String callocate/reallocate fails with FB64
Hi, I don't see why the following doesn't work (FB 64-bit on 64-bit Win7 using "-w pedantic -exx -g"): dim as string ptr x = callocate(1,sizeof(string)) if x <> 0 then x[0] = "a" for i as integer = 2 to 10 x = reallocate(x,i*sizeof(string)) if x <> 0 then x[i-1] = "b" n...
- Mar 15, 2016 8:39
- Forum: Windows
- Topic: FB 64-bit gdiplus include problem
- Replies: 8
- Views: 2702
Re: FB 64-bit gdiplus include problem
With 64-bit and the code #include once "win\gdiplus.bi" I get lots of errors of the type Symbols defined inside namespaces cannot be removed. If I use the following code, #ifdef __FB_64BIT__ #inclib "gdiplus" #include "win\gdiplus-c.bi" #else #include once "win\gdi...
- Mar 15, 2016 8:29
- Forum: Beginners
- Topic: [Solved] Is this supposed to be allowed?
- Replies: 3
- Views: 950
[Solved] Is this supposed to be allowed?
Hi, is the following supposed to be allowed? sub test(byref x as integer) print x for i as integer = 0 to 0 dim as integer x = 4 print x next i if x = 3 then dim as integer x = 4 print x end if print x end sub dim as integer x = 3 test(x) sleep