Thanks Eros, Michael!
Michael, BGR is no problem. Since the latest beta, TBGL supports %TBGL_DATA_BGR as well, so you can get the colors correct.
Petr
thanks Eros
typo "bmHeight: " & $TAB & BI.bmWidth & $CRLF & _
I had a play and heres a quick stab at it with the jpeg.dll only one issue and thats the way bitmap files are constructed the bytes are in BGR rather than RGB its not difficult to fix its just slow.
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
Thanks Eros, Michael!
Michael, BGR is no problem. Since the latest beta, TBGL supports %TBGL_DATA_BGR as well, so you can get the colors correct.
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
Thanks Michael, typo fixed.
My idea is not to work on a script level but to see if TImage module can be used to pass a valid BMP handle to other compiled functions (let's say TBGL) and still be able to get valid BMP info. So at the and all is compiled and thinBasic programmer should be transparent to all of the inside.
To me TImage (and internally PBIMAGE.DLL) is able to load different file formats producing valid BITMAP handle.
Than other module can get those handlers and do what they need.
Handle created is the same created with LoadImage API.
Another option is to embed PBIMAGE.DLL into other modules (like I did here in TImage) and use it as slave worker for loading images. Than use them internally as bitmaps.
That's the main mad ideas.
Maybe this is all superfluous when we will move to WinXP or above only thinBasic.
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
Hi,
if PBIMAGE.DLL will work well, and it seems it does ok, I will consider embedding it to TBGL for Win9x systems.
This will allow M15 models to have JPG and PNG textures, and texture loading functions could adopt it as well.
Once we jump to XP, I will remove it and use GDI+ instead.
I am just not sure about the licence of PBIMAGE.
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
hi all, petr, michael, eros.
I will try another way. It has taken over one and a half hour to check my codes and I have made one IMAGE.DLL with powerbasic. It has a lot of feature of "win32api.inc" and I don't know if I can use it for thinbasic too. I will try this one tomorrow and make it. I need time. I will include also one "open image" dialog button for *.jpg, *.bmp, *.png files.
testversion IMAGE.DLL and exe File I add here with one test-photo.
"PBIMAGE.DLL" and "pbimage.bas" I haven't seen some hours before (sorry), because I haven't studied the "resources" folder
best regards, Frank
ps: new update with "openFile" button (inkl. filter) I have done but I cannot yet load Images into new dialog. will come
you can't always get what you want, but if you try sometimes you might find, you get what you need
Frank what does "myFunction1" do ? apart from a message box.
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
good work michael with your jpeg dll test
I have seen the last posts just at this time and will post my new stuff to another place at board. I am thinking it's better not to confuse thinbasic user here with another DLL and tb examples.
best regards, frank
ps:It was only a first test for my "Image.DLL" example if this function runs too. has only a dummy sense. will delete it for next timeFrank what does "myFunction1" do ? apart from a message box.
you can't always get what you want, but if you try sometimes you might find, you get what you need
An improved version of TImage module is now part of current thinBasic beta 1.7.10.0 distribution.
This thread is now closed.
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