test: the trimmed sheet in the print file test is 300 DPI, with no resolution note to confirm
Some checks failed
Build and deploy / Validate source (push) Successful in 9s
Build and deploy / Integration suite on a real stack (push) Failing after 3m35s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Has been skipped

Between 96 and 199 DPI the server asks for the resolution note, as it
should; the test sheet is now at the normal 300 DPI.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-18 13:40:57 -03:00
parent 9e31345cf7
commit 378266afa2

View File

@@ -111,11 +111,11 @@ def run():
# sends what the Site cut from the top and bottom of a 27 x 30 cm UV sheet
# with 20 cm of art in the middle, as web/site-upload.js aplicaCorte does.
# The order bills and prints the 21 cm left, the art whole.
# 60 px per cm (152 DPI, above the 96 the Site and the server require).
sheet = Image.new('RGBA', (1620, 1800))
sheet.paste(Image.new('RGBA', (1380, 1200), (30, 60, 200, 255)), (120, 300))
# At 300 DPI, so neither the Site nor the server asks for a resolution note.
sheet = Image.new('RGBA', (px(27), px(30)))
sheet.paste(Image.new('RGBA', (px(23), px(20)), (30, 60, 200, 255)), (px(2), px(5)))
buffer = io.BytesIO()
sheet.save(buffer, 'PNG', dpi=(152.4, 152.4))
sheet.save(buffer, 'PNG', dpi=(300, 300))
sheet_upload = upload_bytes(client, buffer.getvalue(), name='LOCAL-TRIMMED-SHEET.png')
trimmed = {'mode': 'uvfile', 'metres': '0.21', 'grade': 90, 'uploads': [sheet_upload],
'production': {'version': 3, 'film_width_cm': 27, 'height_cm': 21,