Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: TImage experimental

  1. #11
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    160

    Re: TImage experimental

    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.
    Attached Files Attached Files
    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

  2. #12
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736

    Re: TImage experimental

    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

  3. #13
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: TImage experimental

    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

  4. #14
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,153
    Rep Power
    736

    Re: TImage experimental

    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

  5. #15
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    52
    Posts
    944
    Rep Power
    111

    Re: TImage experimental

    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
    Attached Images Attached Images
    Attached Files Attached Files
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  6. #16
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    160

    Re: TImage experimental

    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

  7. #17
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    52
    Posts
    944
    Rep Power
    111

    Re: TImage experimental

    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:
    Frank what does "myFunction1" do ? apart from a message box.
    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 time
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  8. #18
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,817
    Rep Power
    10

    Re: TImage experimental

    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

Page 2 of 2 FirstFirst 12

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •