核对文件类型和原始像素,避免把base64塞进对话截断
本页展示随包原生输入和验收参考。目标产品运行状态:未运行。表格与图片不代表产品已经生成的结果。
input.csv / practice-data.json
本课实际输入字段
| file | format | width | height | text |
|---|---|---|---|---|
| ticket.png | PNG | 1200 | 800 | ¥68 |
| ticket.jpg | JPEG | 1200 | 800 | ¥68 |
| ticket.webp | WebP | 1200 | 800 | ¥68 |
选择官方上传脚本
reference.csv:作者验收映射,不是目标API回包
| supportedImages | check | expected | uploadMethod |
|---|---|---|---|
| ["png", "jpg", "jpeg", "webp"] | |||
| full lower edge | refund text visible | ||
| local file script, not chat base64 |
规则与输入文件原文
{
"inputRows": [
{
"file": "ticket.png",
"format": "PNG",
"width": 1200,
"height": 800,
"text": "¥68"
},
{
"file": "ticket.jpg",
"format": "JPEG",
"width": 1200,
"height": 800,
"text": "¥68"
},
{
"file": "ticket.webp",
"format": "WebP",
"width": 1200,
"height": 800,
"text": "¥68"
}
],
"referenceRows": [
{
"supportedImages": [
"png",
"jpg",
"jpeg",
"webp"
]
},
{
"check": "full lower edge",
"expected": "refund text visible"
},
{
"uploadMethod": "local file script, not chat base64"
}
],
"invalidRows": [
{
"file": "vector-renamed.png",
"actualFormat": "SVG",
"error": "extension mismatch"
},
{
"file": "truncated-base64.txt",
"error": "not original complete image"
}
],
"notes": [
"全部输入为作者自制教学资料,不含真实客户或账号。",
"referenceRows是校验基准,不是目标模型预测或识别结果;targetProduct=not_run。"
],
"files": {
"input.json": "[\n {\n \"file\": \"ticket.png\",\n \"format\": \"PNG\",\n \"width\": 1200,\n \"height\": 800,\n \"text\": \"¥68\"\n },\n {\n \"file\": \"ticket.jpg\",\n \"format\": \"JPEG\",\n \"width\": 1200,\n \"height\": 800,\n \"text\": \"¥68\"\n },\n {\n \"file\": \"ticket.webp\",\n \"format\": \"WebP\",\n \"width\": 1200,\n \"height\": 800,\n \"text\": \"¥68\"\n }\n]\n",
"reference.json": "{\n \"identity\": \"作者验收参考,非模型返回\",\n \"rows\": [\n {\n \"supportedImages\": [\n \"png\",\n \"jpg\",\n \"jpeg\",\n \"webp\"\n ]\n },\n {\n \"check\": \"full lower edge\",\n \"expected\": \"refund text visible\"\n },\n {\n \"uploadMethod\": \"local file script, not chat base64\"\n }\n ]\n}\n",
"invalid.json": "{\n \"identity\": \"作者构造负例,非实际错误回包\",\n \"rows\": [\n {\n \"file\": \"vector-renamed.png\",\n \"actualFormat\": \"SVG\",\n \"error\": \"extension mismatch\"\n },\n {\n \"file\": \"truncated-base64.txt\",\n \"error\": \"not original complete image\"\n }\n ]\n}\n",
"case.md": "# Stitch上传参考图:核对文件类型和原始像素,避免把base64塞进对话截断\n\nStitch上传参考图使用官方本地上传脚本而非把整张图的base64写入对话。输入清单标出格式、像素和文件摘要,上传后检查裁切与身份是否对应。\n\n## 准备原创参考图\n\n用本课票券样稿导出PNG、JPG和WebP,保存原始画布尺寸。\n\n使用同一设计便于检查格式转换是否影响文字和边缘。\n\n## 核对扩展名与格式\n\n确认PNG实际签名和扩展名一致,并记录文件字节数。\n\n不要把SVG只改后缀为png;官方脚本按扩展名识别MIME。\n\n## 选择官方上传脚本\n\n查看upload_to_stitch.py支持的图片类型与必需参数。\n\n脚本直接读取文件发送,避免对话base64输出上限导致截断。\n\n## 在练习项目上传\n\n指定真实projectId和本地文件路径,密钥按授权环境提供。\n\n未授权云端执行时只保留输入清单,不填虚构上传成功。\n\n## 检查返回画面\n\n读取实际返回资源,比较边框、票价和底部细字。\n\n若缩略图裁掉底部,应查看原资源而不是删掉细字让它通过。\n\n## 记录格式差异\n\n把三种格式对应资源分别登记,不把重复上传误当三种设计方案。\n\n透明背景或压缩差异在台账单独说明。\n\n## 交付媒体回执\n\n保存原创源图、文件清单、实际返回身份和完整预览。\n\n上传了图片只代表视觉上下文,不是可编辑UI代码已经生成。\n\n身份:输入与参考为作者材料;localCli有实测记录时仅证明对应CLI运行,目标云端与模型推理未执行。\n",
"ticket-source.svg": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"1200\" height=\"800\"><rect width=\"1200\" height=\"800\" fill=\"#f7f4ec\"/><rect x=\"60\" y=\"60\" width=\"1080\" height=\"680\" rx=\"24\" fill=\"#184a45\"/><text x=\"120\" y=\"230\" fill=\"white\" font-family=\"Arial,sans-serif\" font-size=\"80\">FIELD KIT</text><text x=\"120\" y=\"370\" fill=\"white\" font-family=\"Arial,sans-serif\" font-size=\"72\">¥68</text><text x=\"120\" y=\"650\" fill=\"white\" font-family=\"Arial,sans-serif\" font-size=\"34\">Cancel 24 hours before start</text></svg>"
}
}应当保留的约束
| supportedImages | check | expected | uploadMethod |
|---|---|---|---|
| ["png", "jpg", "jpeg", "webp"] | |||
| full lower edge | refund text visible | ||
| local file script, not chat base64 |
故意构造的错误样例
| file | actualFormat | error |
|---|---|---|
| vector-renamed.png | SVG | extension mismatch |
| truncated-base64.txt | not original complete image |
先保存真实产品输出,再逐项对照。actualOutput / actualResult 在未执行时保持 not_run,不能把这里的期望值复制成已测结果。