Control.FindImage: Image not found

Class library usage, coding and language questions.
jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Control.FindImage: Image not found

Post by jabelshauser » Tue Apr 15, 2008 9:32 am

The Image in a Tooltip couldn't be found. Reference is the orig. picture in sam e resolution and size.
The Picture-Control was found by Ranorex with correct size (16x16), but the FindImage / CompareImage returns false
Any Idea ?

Regards Jörg

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Tue Apr 15, 2008 10:37 am

There might be an offset between the position of the image control and the displayed image itself. Please, try to search in the tooltip control (FindImage method) instead of searching in the image control itsself!

Is this a Win32 or .NET application?

Alex
Ranorex Support Team

jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Post by jabelshauser » Tue Apr 15, 2008 11:55 am

It is a .Net 1.1 application

...the suggestion had no success. Regardless if i exec. FindImage at the Tooltipcontrol, or the picture-subcontrol, the image wasn't found.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Tue Apr 15, 2008 12:36 pm

Is there a border around the image or are some pixels at the edges not displayed? You could cut off the edges of the reference image by two pixels or so, thus making it 12x12 pixels, and search for that.

We haven't yet tried to search for images in a tooltip. Can you send us a sample application with an image in a toolbar? The .NET internal ToolTip class does not provide that kind of feature.

Regards,
Alex
Ranorex Support Team

jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Post by jabelshauser » Thu Apr 17, 2008 7:58 am

I have tried to cut off the edges, but no success. Also pictures not in a tooltip (other control) won't be found.
Is there a possibility to enable ranorex-debug-output, to see whats happens ?
Unfortunately it isn't possible to send you a example-application.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Thu Apr 17, 2008 9:10 am

There might be a problem with color conversion.
What color depth are you using on your desktop ?
Does it match the color depths of the images you are using?
Maybe you can send us a (partial) screenshot and the image you are searching with.

Michael
Ranorex Team

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Thu Apr 17, 2008 9:33 am

The problem could be much simpler: Do you use a Bitmap (bmp) file as reference? If not, please try to convert the file to a bitmap and try again.

Alex
Ranorex Support Team