redndahead Posted August 31, 2004 Share Posted August 31, 2004 I want my picture to fit into a certain area 1) if I set the height and width of my pic control the picture still extends outside the borders. 2) Really what I would like is the ability to have the picture automatically resize to fit whatever size I make the control. I read a couple of posts on it so I see other people are having issues but I didn't see any replys so sorry if it has already been discussed Any thoughts? red Link to comment Share on other sites More sharing options...
Lazycat Posted August 31, 2004 Share Posted August 31, 2004 (edited) I use next trick for now: $picture = GUISetControl("pic", "picname.jpg", 20, 20) GUISetControl($picture, "picname.jpg", 20, 20, 100, 100) Not very beautifull, but working. If you need to keep aspect ratio of image and you don't know what aspect of image is, you can try my UDF for get image size and do needed calculations. Edited August 31, 2004 by Kot Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
redndahead Posted September 1, 2004 Author Share Posted September 1, 2004 Thanks it works great, but that is the strangest work around that I have ever seen. red Link to comment Share on other sites More sharing options...
redndahead Posted September 1, 2004 Author Share Posted September 1, 2004 Alright If I try to update the pic control using GuiWrite I lose the size of the control that I once had. -JPM I saw you were working on the pic control any plans to fix these two bugs? red Link to comment Share on other sites More sharing options...
redndahead Posted September 1, 2004 Author Share Posted September 1, 2004 Alright I figured out to not use guiwrite but to use guisetcontrol like Kot showed above, but still I think at least the initial setting could be considered a bug. Link to comment Share on other sites More sharing options...
jpm Posted September 2, 2004 Share Posted September 2, 2004 Alright I figured out to not use guiwrite but to use guisetcontrol like Kot showed above, but still I think at least the initial setting could be considered a bug. <{POST_SNAPBACK}>What is thereslt if the initial is $picture = GUISetControl("pic", "picname.jpg", 20, 20,100,100) Link to comment Share on other sites More sharing options...
redndahead Posted September 2, 2004 Author Share Posted September 2, 2004 (edited) You get the image, but it doesn't fit the width and height you specify. It stays the same with and height of the original image size. Edited September 2, 2004 by redndahead Link to comment Share on other sites More sharing options...
Lazycat Posted September 3, 2004 Share Posted September 3, 2004 Really, no matter if you use or not size setting in the $picture = GUISetControl("pic", "picname.jpg", 20, 20,100,100) control doesn't resize. I remove it from this line just because this not matter for result... Koda homepage ([s]Outdated Koda homepage[/s]) (Bug Tracker)My Autoit script page ([s]Outdated mirror[/s]) Link to comment Share on other sites More sharing options...
jpm Posted September 3, 2004 Share Posted September 3, 2004 You get the image, but it doesn't fit the width and height you specify. It stays the same with and height of the original image size. <{POST_SNAPBACK}>can you attach the jpg your are using I will have a look why the first size does not do the job? Link to comment Share on other sites More sharing options...
redndahead Posted September 3, 2004 Author Share Posted September 3, 2004 Here is the image red Link to comment Share on other sites More sharing options...
jpm Posted September 6, 2004 Share Posted September 6, 2004 Here is the image red <{POST_SNAPBACK}>Thanks I got the error (?) the pic creation was a cut and paste of Splash code and it is not working. I change the way the sizing is done by a MoveWindow and now it works I submit the correction to Jon // SetWindowPos(A,HWND_TOPMOST,X,Y,W,H,SWP_DRAWFRAME); MoveWindow(A,X,Y,W,H,TRUE); Just a support question how do you attach Thumbnails? Link to comment Share on other sites More sharing options...
redndahead Posted September 7, 2004 Author Share Posted September 7, 2004 You just attach any picture as a file and it inserts it as a thumbnail. =) Thanks for the change in code. red Link to comment Share on other sites More sharing options...
jpm Posted September 7, 2004 Share Posted September 7, 2004 You just attach any picture as a file and it inserts it as a thumbnail. =) Thanks for the change in code. red <{POST_SNAPBACK}>Thanks for the thumbnail. I was thinking I try it and it was not working ... Link to comment Share on other sites More sharing options...
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