Abraxas,
that would be a great addition!
Thanks a lot
Eros
IF i get some time i might look into writing a gfx file format module
jpg to RGB
png to RGBA
...
no point listing all of them.
Just thinking PB or C++, i will only say it make take some time.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Abraxas,
that would be a great addition!
Thanks a lot
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Only good messages from tB world
That would be great Abraxas,
good luck with your project !
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
What does anyone know about http://freeimage.sourceforge.net/
would that be worth looking at?
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Yes, of course.
And Mr. Josè Roca (as usual) has already developed Power Basic wrappers: http://www.jose.it-berater.org/smffo...php?topic=82.0
I think FreeImage.inc file produced by Josè can be used in thinBasic quite out of the box. Maybe few changes are needed like define RGB QUAD type and remove the WIN32API.INC include file that is Power Basic related.
[code=thinbasic] Type RGBQUAD
rgbBlue As Byte
rgbGreen As Byte
rgbRed As Byte
rgbReserved As Byte
End Type[/code]
Maybe someone with some (well, a lot of) free time can have a look and produce some script example.
The biggest problem I see is that FreeImage lib uses callbacks and callbacks are not possible in thinBasic due to its interpreted nature and structure. So a wrapper module is needed.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Abraxas, yeah Kent would like to see such a module for sure. So go for it!
Here is the current commandset for the Path module:
Now of to the path calucation function, some path retrieving stuff and then documenting everything. That I like the most, NOT! And of course, writing someTPath_NodeExist TPath_AddNode TPath_DeleteNode TPath_GetChildCount TPath_GetChildNode TPath_AddChildNode TPath_DeleteChildNode TPath_GetChildCost TPath_SetChildCost TPath_GetNodeCount TPath_SetNodeActive TPath_SetNodeX TPath_SetNodeY TPath_SetNodeZ TPath_GetNodeActive TPath_GetNodeX TPath_GetNodeY TPath_GetNodeZ TPath_GetDist2D TPath_GetDist3D TPath_SaveNodes TPath_LoadNodes TPath_Init
sample scripts.
Thanks Mike, I have never worked with pathing commands before, but it looks like a nice list of commands, thanks for the preview list!
Yes, an image handling module would be fantastic Abraxas!
Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server
Hi,
path module sounds really cool !
Such a wide command set is promising indeed !
Abraxas, your module idea looks good, only possible trouble is that just FreeImage is over 1 MB DLL, so this could expand size of applications a lot. This is why my implementation of JPG and PNG loader is not here, as I wanted to code it on my own to keep size down. Sadly, currently I have no time resources to do it.
Thanks,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
I will dig out my file format book and start reading up when i get time which doesnt look too good at the moment.
i was thinking of bmp,jpg,tga,tiff,png.gif.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Petr,Originally Posted by Psch
why not using GDI+?
OK, it is not defaulted present in OS before Win2K but it will not require any new lib.
If you use dynamic linking (and not static) you will be able to determine if GDI+ is present or not. And consider GDI+ can be downloaded from Microsoft to be used also on Win9X OSs.
Also you only need to make few function just to load JPG (for example) images and convert on the fly to BMP buffers in memory.
The GdipCreateBitmapFromFile seems what you need. Example:
[code=vb]
'...
LOCAL hStatus AS LONG
LOCAL pBitmap AS DWORD
strFileName = UCODE$("Any.jpg") ' <-- change
hStatus = GdipCreateBitmapFromFile(strFileName, pBitmap)
'...
[/code]
What do you think?
PS: as usual, Josè forum is the source of those info: http://www.jose.it-berater.org/smffo...hp?topic=259.0
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Bookmarks