Skip to content

Commit

Permalink
longitudinal reports: save as webp
Browse files Browse the repository at this point in the history
  • Loading branch information
sshane committed Oct 15, 2024
1 parent 3a150e5 commit 277691c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/longitudinal_maneuvers/generate_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,9 @@ def report(platform, route, _description, CP, ID, maneuvers):
fig.tight_layout()

buffer = io.BytesIO()
fig.savefig(buffer, format='png')
fig.savefig(buffer, format='webp')
buffer.seek(0)
builder.append(f"<img src='data:image/png;base64,{base64.b64encode(buffer.getvalue()).decode()}' style='width:100%; max-width:800px;'>\n")
builder.append(f"<img src='data:image/webp;base64,{base64.b64encode(buffer.getvalue()).decode()}' style='width:100%; max-width:800px;'>\n")
builder.append("</details>\n")

summary = ["<h2>Summary</h2>\n"]
Expand Down

0 comments on commit 277691c

Please sign in to comment.