jessezach / RobotEyes

Image comparison for Robot Framework
MIT License
75 stars 24 forks source link

The visualReport should display images withour a blur #92

Closed MininAS closed 3 years ago

MininAS commented 3 years ago

Does it possible to do that visualReport displays images without a blur? A very small image looks horrible.

Example with the microphom from the google search input field: image

jessezach commented 3 years ago

This is because small icons are saved with larger dimensions, it ends up looking stretched. I can enhance the capture element keyword to additionally take dimensions to save the image in. I will have to check if there's a way to automatically do this

MininAS commented 3 years ago

Hmm... The visual_images folders contain saved images with own dimensions, i don't see some icons are saved with larger dimensions. image

When image looking stretched in reporting is good for evaluate and visualisation images by human. But it is not good when they is blur

jessezach commented 3 years ago

My bad. I had fixed the dimensions issue a while back. This issue is because the report html contains fixed width and height for each image in the table. Retaining the original image width and height might probably make the table look uneven. Will check it out. Meanwhile, if you are able to fix the css of the table cell, then you can raise a PR or send me the css changes.

MininAS commented 3 years ago

fixed width and height for each image in the table - is good!!! Also, I think that's the way it should be

MininAS commented 3 years ago

I assume that is the browser does blur for small image when it is displayed in bigger size then it is

jessezach commented 3 years ago

Yes because the width and height is fixed. Smaller images get stretched width and height wise

MininAS commented 3 years ago

Found some solution http://jsfiddle.net/namuol/VAXrL/1459/

MininAS commented 3 years ago

It seems it works image

jessezach commented 3 years ago

Can you raise a PR with the changes? You need to make the changes here https://github.com/jz-jess/RobotEyes/blob/master/RobotEyes/report_generator.py#L315 . From line 315 - 335. I can test and merge it later. You can change the version 1.5.9 in setup.py

MininAS commented 3 years ago

Do you mean to add style for each ?

jessezach commented 3 years ago

Ah I see. We can't just add it for everything right. This needs to be added only if the image is small? Does it affect regular sized images as well? They should not be pixelated if they're not small

MininAS commented 3 years ago

Very good question!!! I will check and let known

MininAS commented 3 years ago

I think we can image-rendering: pixelated; for any image. Only perhaps needs to keep geometric proportions? image

But my previous questiom is means to add style directly to HTML tag? Or we can add it to some common parent tag?

jessezach commented 3 years ago

The style needs to be added to the img tags I believe. Not sure if adding to parent will work. You can add a css at the beginning within style tags img { width: 200 image-rendering: pixelated} something like this.

MininAS commented 3 years ago
$ git push origin Issue-92
remote: Permission to jz-jess/RobotEyes.git denied to MininAS.
fatal: unable to access 'https://github.com/jz-jess/RobotEyes.git/': The requested URL returned error: 403
jessezach commented 3 years ago

https://opensource.com/article/19/7/create-pull-request-github

MininAS commented 3 years ago

https://github.com/jz-jess/RobotEyes/pull/94

MininAS commented 3 years ago

Should I do somethink else that PR can be pushed?

jessezach commented 3 years ago

Nope. I need to test it as soon as I find sometime. Will merge after. You can install your branch into your systems meanwhile to use the fix.