Page 1 of 1

Image Validation

Posted: Wed Jun 12, 2013 11:37 am
by Firstsource
I have a common application (WinForms) which is integrated with different applications.
I would like to automate the UI part of the common app. which has images with Rotate, Zoom in, and Zoom out functionalities and run the same in all applications.
But our image control size varies irrespective of the applications. When i tried to validate the image with contains or compare options using the tool, test step always get failed due to mismatch of expected and actual images. Actual image varies due to the change in image control size of the application. Do we have any other way to validate the images when image control size differs for the apps?

Re: Image Validation

Posted: Thu Jun 13, 2013 3:54 pm
by Support Team
Hello,

Image comparison works pixel by pixel. If there were changes in size or color, the validation would fail.

You could try to resize your image by using a method called Imaging.Resize(Bitmap input, int width, int height). This re-sized image could be used for your validation. Please take a look at our API documentation.
Additionally, you might need to change the similarity to a lower value (e.g. 0.95).

Regards,
Markus (T)

Re: Image Validation

Posted: Thu Jun 13, 2013 4:42 pm
by mdgairaud
If you finally resize the image, be careful with proportions to avoid mismatches because of stretching the image.

Also, you can try to instead of validate the entire image, validate only a part of it that is unique for this image. For my image validation I use some methods depending the circumstances: cropping image, turn to B/W, check some pixels are filled...

have luck.


regards,
Mateo.

Re: Image Validation

Posted: Tue Jun 18, 2013 7:16 am
by Firstsource
Thanks for your input will try the solution that you mentioned see if it works for us.

Re: Image Validation

Posted: Mon Dec 09, 2013 9:55 am
by daniel147
This image processor control SDK owns the APIs for developers to create image thumbnail, resize, crop, scale, flip, rotate and watermark source image file. Besides, if you want to apply some popular image effects to target image file, like image sharpening, image vintage effect creating, image color adjusting and image filtering, this control is also suitable.