View Full Version : New image controls
José Roca
07-05-2009, 04:51
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/smfforum/index.php?topic=3138.0
FreeImageCtx: http://www.jose.it-berater.org/smfforum/index.php?topic=3142.msg9930#msg9930
Reference: http://www.jose.it-berater.org/controls/iframe/index.htm
ErosOlmi
07-05-2009, 06:57
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
Michael Hartlef
07-05-2009, 07:02
I thought GDI+ support will come with thinBasic 2?
ErosOlmi
07-05-2009, 07:08
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
catventure
08-05-2009, 08:13
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.
ErosOlmi
08-05-2009, 10:55
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
catventure
03-03-2015, 22:24
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.
catventure
04-03-2015, 20:27
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.