SShortSingh.
Back to feed

Developer details browser-based tool for meeting strict government photo upload limits

0
·1 views

Government visa forms like the US DS-160 and China's online system enforce strict JPEG file size windows, often between 54KB and 240KB with compression ratio limits. A developer has created a browser-based tool that automatically adjusts photo quality to fit these constraints without server involvement. The tool uses a binary search algorithm on JPEG quality settings to find the largest acceptable file size within the required range. It prioritizes higher quality within the limit to reduce rejections for blurry photos and handles edge cases where photos are inherently too large or too small.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Google releases Gemma 4 open AI model for complex logic and agentic workflows.

Google has officially released Gemma 4, a new open-model AI family. The model is designed for complex reasoning, agentic workflows, and offers multimodal capabilities with a 256K context window. It is currently available for deployment on Google Cloud, Vertex AI, and other platforms. This announcement is separate from industry reports about a future flagship model called Gemini 4, which remains unconfirmed by Google.

0
ProgrammingDEV Community ·

Developer tests in-browser translation, finds 30% of phrases wrong in meaning

A developer tested a free, privacy-focused browser-based machine translation tool that processes text locally. Using 30 English-Russian phrases, the evaluation found 30% had a meaning-altering error, while 43% were fully correct. The tool struggled significantly with idioms, casual speech, and ambiguous legal or technical phrases. Following benchmarks against several API-based models, the developer replaced the engine with a server-side model for improved accuracy, though this sacrifices the original privacy benefit.

0
ProgrammingDEV Community ·

Developer creates free 563-drug harm reduction library using Cloudflare's free tier

A developer has created plugreports, a free harm-reduction library containing profiles for 563 drugs and 61 mixing danger guides in nine languages. The platform provides verified hotlines across nine regions and an identification video library to offer factual information instead of forum speculation. The entire system runs on Cloudflare's free tier using a custom Python script that generates approximately 1,100 static HTML pages with structured data. Machine translation via Workers AI handled bulk translation of content, with human review possible through an admin panel. The project was motivated by search data showing high volume for drug identification and safety questions where inaccurate information could be dangerous.

0
ProgrammingDEV Community ·

OpenAI launches Dots agents, developer creates open-source local alternative called Sparks

OpenAI launched Dots, persistent background AI agents, on Tuesday. A developer created Flash, an open-source alternative that runs locally within 24 hours. The developer's version, called Sparks, operates on user-selected models through Ollama and continues working after the application closes. Sparks are configured with specific goals, schedules, and boundaries via simple commands or requests. Each spark functions autonomously, files reports, and can be interacted with through a chat interface.

Developer details browser-based tool for meeting strict government photo upload limits · ShortSingh