Sign in to follow this  
Followers 0
sshrum

GUICtrlSetImage returning success on failure

7 posts in this topic

I'm trying to pass an image to the GUICtrlSetImage and the function is returning success on a image (JPG) that it's not displaying (the gui window is empty).

The image can be found here:

http://www.deviantart.com/deviation/34318122/

Click on the image to get the fullsize and do a right-click 'Save as...'.

How do I test to see if the image actually is displayed?


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites



By making sure that the file is bmp, not jpg or anything else?


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

By making sure that the file is bmp, not jpg or anything else?

File is a jpg...which the picture control supports (I'm loading a ton of other jpg files that work)

Not sure if it's a jpg2k file thou.

There's a good question...does the pic control support jpg2k files?

Edited by sshrum

Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

File is a jpg...which the picture control supports (I'm loading a ton of other jpg files that work)

Picture control (GUICtrlCreatePic) supports, GUICtrlSetImage doesn't.

"be smart, drink your wine"

Share this post


Link to post
Share on other sites

Huh?

Then how do you change a image in a already created picture control? CreatePic creates a new object...SetImage allows for defining a image in an existing pic control.

The help file isn't specific enough...you can use jpg's and gifs as well in relation to the pic control.

Per the help file in regards to CreatePic:

To set or change information in the control see GUICtrlSet....

To update the picture after the dialog box is displayed just use GUICtrlSetImage


Sean Shrum :: http://www.shrum.net

All my published AU3-based apps and utilities

'Make it idiot-proof, and someone will make a better idiot'

 

Share this post


Link to post
Share on other sites

Ok, my bad.

So what you're saying is, that you have a GUICtrlCreatePic with some image, then later try to change it with GUICtrlSetImage with that image from the link you posted, and it doesn't work? Can you post an example which reproduces such behaviour? Works for me...


"be smart, drink your wine"

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I think the answer to the question I'm about to pose may explain your problems as well...

Is there an undocumented limit on the resolution of pictures (.jpg in this case) that can be displayed in a Picture Control (GUICtrlCreatePic)?

It seems to me that there is - I find that no picture wider than 2730 pixels will display, no matter the height -

2730x2048 (approx. .75 ratio - normal ratio for digital pictures) works.

2731x2048 doesn't work

2730x8000 works (but it's slow, as that's a big file)

2731x1 doesn't work

1x10000 works

So it appears that the height doesn't matter, but the width cannot go over 2730.

Has anyone else found this?

Is this a known limitation (it's not listed in the 'technical limits of AutoIt' section of the helpfile)?

Is there a way around it?

Should this be listed in the bugs section?

I know that seems like a large picture to be displaying, but our camera (just a basic point-and-shoot) takes pictures over that resolution without breaking a sweat, and when I'm trying to write a program to allow me to use them to prompt the user, I kind of need to be able to display them.

I note also that the picture sshrum is trying to display is wider than this limitation, so my guess is that's why your picture isn't showing up.

Thanks!

Edit: Wow...200 posts to my name and I'm still asking for help!

Edit2: I just noticed that pictures that don't work on our main computer (running Vista) DO display on my laptop (XP), so maybe that's the problem. sshrum...are you running Vista too?

Edited by james3mg

"There are 10 types of people in this world - those who can read binary, and those who can't.""We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true." ~Robert Wilensky0101101 1001010 1100001 1101101 1100101 1110011 0110011 1001101 10001110000101 0000111 0001000 0001110 0001101 0010010 1010110 0100001 1101110

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0