Results 1 to 8 of 8

Thread: New image controls

  1. #1

    New image controls


    As the PictureCtx control doesn't support many types, because it is based in the outdated IPicture interface, and the ImageCtx control, based in the undocumented interface IImgCtx, used by Internet Explorer, doesn't stretch images propertly if Internet Explorer 8 is installed (Eros has told me that the image is repeated instead of stretched), I have written two new image controls to replace them: GdipImageCtx, based on GDI+, and FreeImageCtx, based in the FreeImage library.

    GdipImageCtx: http://www.jose.it-berater.org/smffo...p?topic=3138.0
    FreeImageCtx: http://www.jose.it-berater.org/smffo...sg9930#msg9930

    Reference: http://www.jose.it-berater.org/contr...rame/index.htm
    Attached Images Attached Images

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

    Re: New image controls

    Thanks a lot José.

    I will change current ImageCTX control embedded into thinBasic with your GDIP version.
    Yes, if IE8 is installed, IImgCtx do not stretch images but repeat horizontally and repeat inverted vertically like you can see in attached images.

    Ciao
    Eros
    Attached Images Attached Images
    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

  3. #3
    thinBasic MVPs Michael Hartlef's Avatar
    Join Date
    Sep 2006
    Location
    Germany
    Age
    58
    Posts
    3,299
    Rep Power
    348

    Re: New image controls

    I thought GDI+ support will come with thinBasic 2?

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

    Re: New image controls

    Yes, you are right, I told that.

    ImageCTX is inside UIAdv module with WebBrowser and XPButton controls.
    They will remain in this state for thinBasic 1.x version . But for the future, due to IE8 internal changes, it is better to move from IImgCtx undocumented interface and use new José code.

    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

  5. #5
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    637
    Rep Power
    83

    Re: New image controls

    Hi,

    Thanks for the update on the IMAGECTX. I had no idea - but I am now using Internet Explorer 8 and can see the effect in my TAB program.
    It's good you are working on correcting this in future version. In the meantime I must think of alternative way to handle graphics...

    catventure.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

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

    Re: New image controls

    I think for thinBasic version line 1.x there will be no changes. José new code uses GDIPlus so using it I would break Win9x compatibility
    When I will move to thinBasic version line 2.x (hope quite soon) I will change it to use José code.

    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

  7. #7
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    637
    Rep Power
    83
    Hi,

    I am resurrecting this thread because I think I would now like to use the GDIp to "stretch" or automatically autosize images to fit graphic controls (label?) used in my adventure program. I understand this will mean that my program will only work on XP and above and no longer be compatible with win98 - but I'm OK with that now.
    Can I do this in TB 1.8.9.0?
    If so, can anyone please show small basic example code as I'm unsure of just exactly HOW to make it happen.
    Much thanks,
    catventure.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

  8. #8
    Senior Member catventure's Avatar
    Join Date
    Oct 2005
    Location
    UK
    Posts
    637
    Rep Power
    83
    I figured it out from the samplescript examples...
    I also found out you can use "USES GDIP" in 1.8.9.0 - so that's OK.

    Didn't think it would require a lot of code just to show an image, but does take a few lines as it turns out.

    Regards,
    catventure.
    http://tab.thinbasic.com - Home Of The ThinBasic Adventure Builder Project. (Interactive Fiction/Text Adventure Maker)

Similar Threads

  1. JPG IMG controls... (Why is that not here?)
    By ISAWHIM in forum UI (User Interface)
    Replies: 3
    Last Post: 26-09-2008, 04:25

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
  •