feat: accept large JPG and WebP artworks instead of refusing them
Above 150 MB the browser cannot read JPG or WebP in parts, so a large artwork was refused. It is now measured from its header, graded and priced with the discount like any other, and placed on the sheet as a full box, which is exact for JPG. The card says there is no preview and that the team checks the art before printing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -128,7 +128,9 @@ function medir(a){
|
||||
return dimensoesImagem(a.f).then(async d=>{
|
||||
if(!d || !(d.w>0) || !(d.h>0)){ a.decodeError=true; return a; }
|
||||
a.px=d.w; a.py=d.h; a.prop=d.h/d.w; a.grande=true;
|
||||
if(!/\.png$/i.test(a.f.name)){ a.decodeError='grande'; return a; }
|
||||
// JPG and WebP cannot be read in parts: the art is placed by its
|
||||
// measurements, as a full box, and the team checks it before printing.
|
||||
if(!/\.png$/i.test(a.f.name)){ a.semPrevia=true; return a; }
|
||||
a.lendo=0; pintaArtes();
|
||||
let mostrado=0;
|
||||
const cv=await previaPngGrande(a.f, 1200, p=>{
|
||||
|
||||
Reference in New Issue
Block a user