[Scummvm-git-logs] scummvm-sites director-buildbot -> 5276f9809d256d9b28f179b51b5a362891f3f15b

sev- noreply at scummvm.org
Thu Aug 27 09:21:47 UTC 2026


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm-sites' repo located at https://api.github.com/repos/scummvm/scummvm-sites .

Summary:
0e987b65ac IMAGEDIFF: Swap screenshot columns on the comparison page
5276f9809d IMAGEDIFF: Fixed some intermediate frames in timeline, added sshot numbers


Commit: 0e987b65ac8b5e260431d72ad1082c508fbdc98e
    https://github.com/scummvm/scummvm-sites/commit/0e987b65ac8b5e260431d72ad1082c508fbdc98e
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-08-27T09:56:50+02:00

Commit Message:
IMAGEDIFF: Swap screenshot columns on the comparison page

Changed paths:
    imagediff/templates/compare.html


diff --git a/imagediff/templates/compare.html b/imagediff/templates/compare.html
index 9b16b28..8b44196 100644
--- a/imagediff/templates/compare.html
+++ b/imagediff/templates/compare.html
@@ -31,17 +31,17 @@
 <table class="comparison-table">
     <thead>
     <tr>
-        <th><a href="{{ url_for('build', build=build1) }}">{{ build1 }}</a></th>
-        <th>Diff</th>
         <th><a href="{{ url_for('build', build=build2) }}">{{ build2 }}</a></th>
+        <th>Diff</th>
+        <th><a href="{{ url_for('build', build=build1) }}">{{ build1 }}</a></th>
     </tr>
     </thead>
     <tbody>
     {% for comp in comparisons %}
     <tr class="{% if comp.has_diff %}has-diff{% else %}no-diff{% endif %}" data-frame="{{ comp.frame_number }}">
         <td>
-            {% if comp.diff_data and comp.diff_data.src_img_data %}
-            <img class="frame-image" src="data:image/png;base64,{{ comp.diff_data.src_img_data }}" alt="Frame {{ comp.frame_number }} in {{ build1 }}">
+            {% if comp.diff_data and comp.diff_data.cmp_img_data %}
+            <img class="frame-image" src="data:image/png;base64,{{ comp.diff_data.cmp_img_data }}" alt="Frame {{ comp.frame_number }} in {{ build2 }}">
             {% else %}
             <div class="missing-frame">Image data not available</div>
             {% endif %}
@@ -58,8 +58,8 @@
             {% endif %}
         </td>
         <td>
-            {% if comp.diff_data and comp.diff_data.cmp_img_data %}
-            <img class="frame-image" src="data:image/png;base64,{{ comp.diff_data.cmp_img_data }}" alt="Frame {{ comp.frame_number }} in {{ build2 }}">
+            {% if comp.diff_data and comp.diff_data.src_img_data %}
+            <img class="frame-image" src="data:image/png;base64,{{ comp.diff_data.src_img_data }}" alt="Frame {{ comp.frame_number }} in {{ build1 }}">
             {% else %}
             <div class="missing-frame">Image data not available</div>
             {% endif %}
@@ -74,4 +74,4 @@
 </div>
 {% endif %}
 </body>
-</html>
\ No newline at end of file
+</html>


Commit: 5276f9809d256d9b28f179b51b5a362891f3f15b
    https://github.com/scummvm/scummvm-sites/commit/5276f9809d256d9b28f179b51b5a362891f3f15b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2026-08-27T11:21:15+02:00

Commit Message:
IMAGEDIFF: Fixed some intermediate frames in timeline, added sshot numbers

Changed paths:
    imagediff/main.py
    imagediff/templates/compare.html


diff --git a/imagediff/main.py b/imagediff/main.py
index 6072a3c..7a4458f 100644
--- a/imagediff/main.py
+++ b/imagediff/main.py
@@ -732,22 +732,17 @@ def compare(build1, build2, target, movie):
     build1_path = os.path.join(SCREENSHOTS_DIR, target, build1)
     build2_path = os.path.join(SCREENSHOTS_DIR, target, build2)
 
-    # Get all frames for this movie in both builds
     build1_frames = get_movie_frames(build1_path, movie)
     build2_frames = get_movie_frames(build2_path, movie)
 
-    # Map frame numbers to filenames for easy lookup
     build1_frame_map = create_frame_map(build1_frames)
     build2_frame_map = create_frame_map(build2_frames)
 
-    # Find only common frames between the two builds
-    common_frame_numbers = sorted(set(build1_frame_map.keys()).intersection(set(build2_frame_map.keys())))
+    all_frame_numbers = sorted(set(build1_frame_map.keys()) | set(build2_frame_map.keys()))
 
-    # For each common frame number, create a comparison entry
     frame_comparisons = []
 
-    # Process only common frames
-    for frame_num in common_frame_numbers:
+    for frame_num in all_frame_numbers:
         build1_frame = build1_frame_map.get(frame_num)
         build2_frame = build2_frame_map.get(frame_num)
 
@@ -756,26 +751,45 @@ def compare(build1, build2, target, movie):
             'build1_frame': build1_frame,
             'build2_frame': build2_frame,
             'has_diff': False,
-            'diff_data': None
+            'diff_data': None,
+            'only_in_build1': build1_frame is not None and build2_frame is None,
+            'only_in_build2': build2_frame is not None and build1_frame is None,
         }
 
-        # Calculate diff
-        img1_path = os.path.join(build1_path, build1_frame)
-        img2_path = os.path.join(build2_path, build2_frame)
-
-        try:
-            diff_result = image_diff(img1_path, img2_path)
-            comparison['has_diff'] = diff_result.get('has_diff', False)
-            comparison['diff_data'] = diff_result
-        except Exception as e:
-            print(f"Error comparing images: {e}")
+        if build1_frame and build2_frame:
+            img1_path = os.path.join(build1_path, build1_frame)
+            img2_path = os.path.join(build2_path, build2_frame)
+            try:
+                diff_result = image_diff(img1_path, img2_path)
+                comparison['has_diff'] = diff_result.get('has_diff', False)
+                comparison['diff_data'] = diff_result
+            except Exception as e:
+                print(f"Error comparing images: {e}")
+        elif build1_frame:
+            img_path = os.path.join(build1_path, build1_frame)
+            try:
+                img = Image.open(img_path)
+                comparison['diff_data'] = {'src_img_data': encode_image(img)}
+                comparison['has_diff'] = True
+            except Exception as e:
+                print(f"Error reading image: {e}")
+        elif build2_frame:
+            img_path = os.path.join(build2_path, build2_frame)
+            try:
+                img = Image.open(img_path)
+                comparison['diff_data'] = {'cmp_img_data': encode_image(img)}
+                comparison['has_diff'] = True
+            except Exception as e:
+                print(f"Error reading image: {e}")
 
         frame_comparisons.append(comparison)
 
-    # Calculate summary statistics
     stats = {
-        'total_common_frames': len(common_frame_numbers),
-        'different_frames': sum(1 for comp in frame_comparisons if comp.get('has_diff', False))
+        'total_frames': len(all_frame_numbers),
+        'total_common_frames': sum(1 for c in frame_comparisons if not c['only_in_build1'] and not c['only_in_build2']),
+        'different_frames': sum(1 for c in frame_comparisons if c.get('has_diff', False)),
+        'only_in_build1': sum(1 for c in frame_comparisons if c['only_in_build1']),
+        'only_in_build2': sum(1 for c in frame_comparisons if c['only_in_build2']),
     }
 
     return render_template('compare.html',
diff --git a/imagediff/templates/compare.html b/imagediff/templates/compare.html
index 8b44196..03eb475 100644
--- a/imagediff/templates/compare.html
+++ b/imagediff/templates/compare.html
@@ -4,6 +4,9 @@
     <title>{{ build1 }} vs. {{ build2 }}/ {{movie}}/ {{target}}</title>
     <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}" />
     <style>
+        body {
+            background-color: #f0f0f0;
+        }
         .diff-indicator {
             color: red;
             font-weight: bold;
@@ -14,6 +17,23 @@
         .missing-frame {
             color: #999;
         }
+        .frame-cell {
+            vertical-align: top;
+        }
+        .frame-wrapper {
+            display: inline-flex;
+            align-items: flex-start;
+        }
+        .frame-number {
+            font-size: 11px;
+            color: #666;
+            padding-top: 2px;
+            margin-right: 0.5em;
+            white-space: nowrap;
+        }
+        .only-in-one {
+            background-color: #fff8e1;
+        }
     </style>
 </head>
 <body>
@@ -26,6 +46,9 @@
 {% if comparisons %}
 <div class="quote">
     <b>Different Frames: {{ stats.different_frames }}</b>
+    {% if stats.only_in_build1 or stats.only_in_build2 %}
+     |  Only in {{ build1 }}: {{ stats.only_in_build1 }}  |  Only in {{ build2 }}: {{ stats.only_in_build2 }}
+    {% endif %}
 </div>
 
 <table class="comparison-table">
@@ -38,16 +61,27 @@
     </thead>
     <tbody>
     {% for comp in comparisons %}
-    <tr class="{% if comp.has_diff %}has-diff{% else %}no-diff{% endif %}" data-frame="{{ comp.frame_number }}">
-        <td>
+    <tr class="{% if comp.has_diff %}has-diff{% else %}no-diff{% endif %}{% if comp.only_in_build1 or comp.only_in_build2 %} only-in-one{% endif %}" data-frame="{{ comp.frame_number }}">
+        <td class="frame-cell">
+            <div class="frame-wrapper">
+            <span class="frame-number">{{ comp.frame_number }}</span>
             {% if comp.diff_data and comp.diff_data.cmp_img_data %}
             <img class="frame-image" src="data:image/png;base64,{{ comp.diff_data.cmp_img_data }}" alt="Frame {{ comp.frame_number }} in {{ build2 }}">
+            {% elif comp.only_in_build1 %}
+            <div class="missing-frame">Not in this build</div>
             {% else %}
             <div class="missing-frame">Image data not available</div>
             {% endif %}
+            </div>
         </td>
-        <td>
-            {% if comp.has_diff %}
+        <td class="frame-cell">
+            <div class="frame-wrapper">
+            <span class="frame-number">{{ comp.frame_number }}</span>
+            {% if comp.only_in_build1 %}
+            <span class="diff-indicator">Only in {{ build1 }}</span>
+            {% elif comp.only_in_build2 %}
+            <span class="diff-indicator">Only in {{ build2 }}</span>
+            {% elif comp.has_diff %}
             {% if comp.diff_data and comp.diff_data.diff_img_data %}
             <img class="frame-image" src="data:image/png;base64,{{ comp.diff_data.diff_img_data }}" alt="Difference for frame {{ comp.frame_number }}">
             {% else %}
@@ -56,13 +90,19 @@
             {% else %}
             <span class="no-diff-indicator">No difference</span>
             {% endif %}
+            </div>
         </td>
-        <td>
+        <td class="frame-cell">
+            <div class="frame-wrapper">
+            <span class="frame-number">{{ comp.frame_number }}</span>
             {% if comp.diff_data and comp.diff_data.src_img_data %}
             <img class="frame-image" src="data:image/png;base64,{{ comp.diff_data.src_img_data }}" alt="Frame {{ comp.frame_number }} in {{ build1 }}">
+            {% elif comp.only_in_build2 %}
+            <div class="missing-frame">Not in this build</div>
             {% else %}
             <div class="missing-frame">Image data not available</div>
             {% endif %}
+            </div>
         </td>
     </tr>
     {% endfor %}




More information about the Scummvm-git-logs mailing list