Champak Posted August 23, 2009 Posted August 23, 2009 (edited) Please take a look at this image. I can open the file just fine by double clicking it and right click preview, but I can't open it in paint shop or in a GUI. I can open it fine in Microsoft Paint, and then when I save it as a jpg in MS Paint....which it is already a jpg, I can then open it in Paint Shop, but more importantly in a GUI. How can I fix, remedy, work around this? Can I do this as an object in the background? Or is there something I'm missing?Image.rar.rar Edited August 23, 2009 by Champak
wolf9228 Posted August 24, 2009 Posted August 24, 2009 Please take a look at this image. I can open the file just fine by double clicking it and right click preview, but I can't open it in paint shop or in a GUI. I can open it fine in Microsoft Paint, and then when I save it as a jpg in MS Paint....which it is already a jpg, I can then open it in Paint Shop, but more importantly in a GUI. How can I fix, remedy, work around this? Can I do this as an object in the background? Or is there something I'm missing? Use GDIPlus library To Save image In a new file #Include <GDIPlus.au3> #include <GuiConstantsEx.au3> _GDIPlus_Startup () $hImage = _GDIPlus_ImageLoadFromFile ( "StockImage.jpg") _GDIPlus_ImageSaveToFile ($hImage,"GDIPlus_Image.jpg") $Width =_GDIPlus_ImageGetWidth($hImage) $Height = _GDIPlus_ImageGetHeight($hImage) _GDIPlus_ShutDown () GUICreate("My GUI picture", $Width + 10, $Height + 20, 10, 10) ; will create a dialog box that when displayed is centered GUISetBkColor(0xE0FFFF) GUICtrlCreatePic("GDIPlus_Image.jpg", 5, 5, $Width, $Height) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop WEnd صرح السماء كان هنا
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now