<div dir="ltr"><div class="gmail_extra">On Tue, Jul 16, 2013 at 8:03 PM, Greg Grossmeier <span dir="ltr"><<a href="mailto:greg@wikimedia.org" target="_blank">greg@wikimedia.org</a>></span> wrote:<br><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":3dz" style="overflow:hidden">Right now the plan is to turn Vips on for PNGs over a certain size (see<br>
<a href="https://bugzilla.wikimedia.org/show_bug.cgi?id=51370" target="_blank">https://bugzilla.wikimedia.org/show_bug.cgi?id=51370</a> ). Everything else<br>
stays the way it is. We could enable more image size/types later as<br>
VipsScaler is improved, but not yet.<br>
<br>
We could get a suite of images of various sizes that are expected to be<br>
scaled using Vips (within that limit suggested by Brian on bug 51370),<br>
if we get an error instead of a valid png, then it's broken (probably<br>
because of an OOM).<br>
<br>
Is this something that could be done?<br>
<br>
If it is, then we should have a bunch of known good images of various<br>
sizes/types (png, jpg, gif, etc) that we throw at it to make sure we<br>
don't break anything as we move forward with more Vips changes.</div></blockquote></div><div class="gmail_extra"><br></div>This sounds to me like a perfect candidate for an automated test. If you can provide (links to) images that are good for the test, I can write code that will upload/thumbnail the images. We can pair on that next week. Or we could generate big images (there are libraries for that, I am sure).</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">The tricky part is checking if "anything looks wrong". Computers are bad at that.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Solution #1: There are libraries for comparing images, we could try one of them. For example, are these two images exactly the same (comparing pixel by pixel)? Should we tolerate up to 1-2% of pixels being different?<br>

<br></div><div class="gmail_extra">Solution #2: The test creates a report (HTML page, for example) displaying original image, uploaded image, thumbnail (...) side by side, so a human could in a minute or two scan a lot of images and see if anything looks strange.</div>

<div class="gmail_extra"><br></div><div class="gmail_extra">Ċ½eljko</div></div>