Document image comparison with safetynet_compare.py.

Change-Id: I12a0bb92031173209b71a5ea5e06bff64a5d80a0
Reviewed-on: https://pdfium-review.googlesource.com/c/43730
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/docs/safetynet.md b/docs/safetynet.md
index 5dc482b..bd0a791 100644
--- a/docs/safetynet.md
+++ b/docs/safetynet.md
@@ -119,6 +119,11 @@
 can be analyzed to find the cause of a regression. KCachegrind is a good
 visualizer for these files.
 
+#### none
+
+Run without any profiler, giving a performance score of 1 always. useful for
+running image comparisons or debugging the script.
+
 ### Common Options
 
 Arguments commonly passed to safetynet_compare.py.
@@ -181,3 +186,21 @@
 `~/job_results/last_revision_covered`. From then on, since a checkpoint is
 available, each run will compare performance with the last checkpoint and update
 the checkpoint.
+
+## Run image comparison
+
+Pass the `--png-dir` option pointing at an output directory to compare the output
+images from rendering the "before" and the "after" branches with pdfium_test.
+
+```shell
+$ mkdir ~/output_images
+$ testing/tools/safetynet_compare.py ~/pdf_samples --branch-before before_visual_changes --branch-after after_visual_changes --png-dir ~/output_images
+```
+
+This will output and automatically open a `~/output_images/compare.html` file
+showing the before/after and the diff. Hover the mouse cursor over the
+before/after image on the left for an easier visual comparison. The "before"
+image is displayed until the cursor hovers over the image, which is then
+replaced with the "after" image.
+
+It is recommended to use `--profiler=none` with this option.