YWyan wanginwangyan.hashnode.dev·3d ago · 8 min read60 % of our image decode failures were HEIC files named .jpgFor a few days our analytics showed a class of failure that made no sense: images rejected by the decoder in well under a second. Not slow failures, not out-of-memory on a huge photo — instant refusal00
YWyan wanginwangyan.hashnode.dev·3d ago · 8 min readA scan is never perfectly squareThe previous problem I wrote about was finding the four corners of a page in a photo. This one is the inverse, and it turned out to be more interesting: take a page that is already perfect — a vector 00
YWyan wanginwangyan.hashnode.dev·3d ago · 7 min readThe adaptive threshold that deleted the thing we were looking forFinding the four corners of a page in a phone photo is the step that turns a picture of a document into a copy of one. Everything downstream — the perspective warp, the flattening, the PDF — is easy o00
YWyan wanginwangyan.hashnode.dev·3d ago · 9 min readThree things that bit us moving a document scanner fully into the browserPhotographing a page and turning it into a clean, printable PDF is, on paper, a solved problem: read a file, fix the perspective on a canvas, flatten the shading, write a PDF. Browsers have shipped ev00