Donate Now Goal amount for this month: 100 USD, Received: 0 USD (0%)
Donate to support this site and ThinBASIC project development

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

Thread: TImage experimental

  1. #11
    thinBasic MVPs Michael Clease's Avatar
    Join Date
    May 2007
    Posts
    1,414
    Blog Entries
    1
    Rep Power
    149

    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
    Why is the world full of nobs trying to push my buttons!!

    Home Desktop : WinXP Pro SP3 - 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 : WinXP Pro SP3 - Intel Pentium 4 - 3 Ghz - 512 MB - ATI Mobile Radeon 7000 IGP
    Work Desktop : WinXP Pro SP3 - Intel core 2 Quad Q8200 - 2.33 Ghz - 2 Gb - Quadro Fx 370

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

    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 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

  3. #13
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    47
    Posts
    7,620
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

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

    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 7 64bit - Intel Core 2 Duo T6600 @ 2.2GHz - 4 GB RAM - NVIDIA GeForce G210M 512MB
    Windows 8 64bit - Intel Core i5-3350P @ 3.1GHz - 8 GB RAM - NVIDIA GeForce GT640 3GB

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

    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 Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Image_Dll_test_Franko_PB.jpg 
Views:	71 
Size:	31.9 KB 
ID:	6229   Click image for larger version. 

Name:	image_DLL_openImageButton.png 
Views:	74 
Size:	98.1 KB 
ID:	6232  
    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 Michael Clease's Avatar
    Join Date
    May 2007
    Posts
    1,414
    Blog Entries
    1
    Rep Power
    149

    Re: TImage experimental

    Frank what does "myFunction1" do ? apart from a message box.
    Why is the world full of nobs trying to push my buttons!!

    Home Desktop : WinXP Pro SP3 - 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 : WinXP Pro SP3 - Intel Pentium 4 - 3 Ghz - 512 MB - ATI Mobile Radeon 7000 IGP
    Work Desktop : WinXP Pro SP3 - Intel core 2 Quad Q8200 - 2.33 Ghz - 2 Gb - Quadro Fx 370

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

    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
    47
    Posts
    7,620
    Blog Entries
    2
    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/ | psch.thinbasic.com
    Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

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