Search found 635 matches

by UEZ
Dec 29, 2017 14:40
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 2413

Re: Faster Renderer for Pset

Also very jumpy on x86. Tested on Win10 x64. I'm wondering why in a web browser the JS animations are so smooth... I added some lines to display the driver name which is used. #Include "fbgfx.bi" Sub setupfloor(xres As Long,yres As Long,floor As Any Ptr, dn as String) dim as string s="...
by UEZ
Dec 28, 2017 1:14
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 2413

Re: Faster Renderer for Pset

Sorry for hijacking this topic for some newbie question but how to use NOT the *oldfashioned habits* for PSetFaster? I updated the code for the plasma example above and changed the PSetFaster code a little bit. Advantage for me at least: I just can vary the screen depth without changing the variable...
by UEZ
Dec 27, 2017 20:42
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 2413

Re: Faster Renderer for Pset

@UEZ, in this section, I personally find it inappropriate, as well as uncool, to post OPC (other peoples code). Especially as old, as it is: clearly from the pre FBC 64-bit age ... (wrongly typed color-variables, again). You mean the PSetFaster function? My intention was not to steal any code and d...
by UEZ
Dec 27, 2017 18:11
Forum: Tips and Tricks
Topic: Faster Renderer for Pset
Replies: 27
Views: 2413

Re: Faster Renderer for Pset

Here a variant of PSet for faster operation: 'Plasma Effect #Define Dist(a, b, c, d) Sqr(((a - c) * (a - c) + (b - d) * (b - d))) Declare Function _Sin6th(fX As Double) As Double Declare Function _Cos6th(fX As Double) As Double declare sub PSetFaster (PosX as Ulong, PosY as Ulong, iRGB as Ulong, iW ...
by UEZ
Dec 13, 2017 18:39
Forum: Beginners
Topic: Image. Is possible to add one?
Replies: 12
Views: 1039

Re: Image. Is possible to add one?

If you don't care about Linux compatibility you can use GDIPlus to load / save in various image formats.
by UEZ
Dec 12, 2017 13:18
Forum: Tips and Tricks
Topic: triangle wave tex
Replies: 2
Views: 533

Re: 3d texture framework

Very interesting coding concept (I never used to code in OO ^^) and that's a very good lesson for me. :)

Btw, I didn't get the idea behind "3d texture framework" which looks good?
by UEZ
Oct 30, 2017 0:46
Forum: Tips and Tricks
Topic: Some kind of a Kaleidoscope [Windows only]
Replies: 2
Views: 383

Re: Some kind of a Kaleidoscope [Windows only]

I know the issue with x64 version of GDI+ but unfortunately development of FB has been stopped and I assume that the x64 version of GDI+ will never be fixed.

¯\_(ツ)_/¯
by UEZ
Oct 30, 2017 0:19
Forum: Tips and Tricks
Topic: Some kind of a Kaleidoscope [Windows only]
Replies: 2
Views: 383

Some kind of a Kaleidoscope [Windows only]

As the title already says - some kind of a Kaleidoscope.

Link to source: GDI+ Kaleidoscope v0.91 build 2017-10-26

Screenshot:
Image
by UEZ
Oct 10, 2017 13:27
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 1506

Re: Count unique colors used in an image using GDIPlus [Windows only]

Can somebody explain me the idea of

Code: Select all

Dim as ulongint t
For x as ulong = &h1FFFC0 to &h1FFFFF
   t = (x \ 64)
   t or= 1ull shl (x mod 64)
   ? (x mod 64), Hex(x \ 64), Hex((x \ 64) and 1ull shl (x mod 64)), Hex(t), Hex(1ull shl (x mod 64))
Next

Sleep

which has counting_pine used?

Thx.
by UEZ
Oct 06, 2017 21:22
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 1506

Re: Count unique colors used in an image using GDIPlus [Windows only]

@dodicat: smart idea to count the colors in an array and it is faster for really huge images compared to the QuickSort variant.

Nowadays such kind of memory usage should be a problem anymore. ^^

Thanks.
by UEZ
Oct 06, 2017 21:12
Forum: Tips and Tricks
Topic: Saving FB image in format Bmp, Gif, Jpeg, Png, Tiff using GDIPlus [Windows only]
Replies: 2
Views: 480

Re: Saving FB image in format Bmp, Gif, Jpeg, Png, Tiff using GDIPlus [Windows only]

@Joshy: I've heard about D3D but never used it. I will check it out.

I updated the code. Now you can set the JPG compression quality.

Danke.
by UEZ
Oct 06, 2017 15:31
Forum: Tips and Tricks
Topic: Saving FB image in format Bmp, Gif, Jpeg, Png, Tiff using GDIPlus [Windows only]
Replies: 2
Views: 480

Saving FB image in format Bmp, Gif, Jpeg, Png, Tiff using GDIPlus [Windows only]

Here the opposite function from dodicat's Pload: 'coded by UEZ build 2017-10-05 #Include "win/gdiplus.bi" Using GDIPLUS declare Function ImageSave(Image As any Ptr, Filename as WString, JPGQual as ULong = 80) as Boolean '' Create 32-bit graphics screen and image. Dim as ushort w = 320, h =...
by UEZ
Oct 06, 2017 15:26
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 1506

Re: Count unique colors used in an image using GDIPlus [Windows only]

St_W wrote:
UEZ wrote:Might be a problem with the stack of the recursive QuickSort function for huge arrays...

Have you tried increasing the stack size?


Thanks for the hint. It works now with -t 8192 also for huge images. :-)

My guess was right...

^^
by UEZ
Oct 06, 2017 12:03
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 1506

Re: Count unique colors used in an image using GDIPlus [Windows only]

If you assume 24-bit RGB, there's a range of 16.7 million possible colours. Nowadays, in most cases you could easily get away with using a 16-megabit array (2MiB) to track which colours have been seen, and count them that way. Unfortunately, for me the code crashes on win7-64 after I choose a file....
by UEZ
Oct 05, 2017 21:25
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 1506

Count unique colors used in an image using GDIPlus [Windows only]

Here a code using GDIPlus to count the unique colors of an image. 'coded by UEZ build 2017-11-27 #define WIN_INCLUDEALL #include once "windows.bi" #Include Once "win/gdiplus.bi" Using GDIPLUS Declare Function FileOpenDialog (Byref sTitle As String, Byref sDir As String = CurDir, ...

Go to advanced search