SShortSingh.
Back to feed

Developer Builds Browser-Based HEIC Converter That Enforces Strict File Size Limits

0
·1 views

A developer has built a browser-based HEIC image converter using Rust compiled to WebAssembly, designed to guarantee output files stay at or below a user-specified byte ceiling rather than simply adjusting a quality slider. The tool decodes HEIC images once into a reusable RGB buffer to avoid costly repeated decoding during preview, rotation, and compression steps. For JPEG output, the converter uses a binary search over a protected quality range (minimum quality 55) to find the highest quality that fits within the target size, falling back to dimension reduction when no quality setting is sufficient. PNG output lacks a comparable quality knob, so the tool instead scales dimensions down iteratively until the file fits, then attempts small upward resizes to make better use of the remaining byte budget. The implementation treats the size target strictly in bytes internally, and tests assert the actual byte inequality rather than relying on rounded kilobyte labels.

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 ·

Open LLM Gateway offers self-hosted, Apache 2.0 LLM control plane with no user cap

A developer has released Open LLM Gateway, a fully open-source, self-hostable LLM control plane licensed under Apache 2.0, after finding existing tools like LiteLLM imposed seat-based licensing restrictions beyond five users. The project was born out of a real operational problem: teams using multiple LLM providers across Google, Azure, and AWS had no unified way to track API key ownership, token usage, or per-product spending. The gateway supports proxying for OpenAI and Anthropic APIs, encrypted key management, cost and token analytics, and an admin portal with role-based access and optional Google login. It is deployable on Cloudflare Workers and Vercel, with the full admin UI included in the open-source release — not just the proxy layer. The project is positioned for organizations that need a self-hosted LLM gateway without enterprise licensing walls, though features like spend limits and guardrails are not yet available.

0
ProgrammingDEV Community ·

Developer builds browser-only PDF compressor that never uploads your files

A developer added a client-side PDF compression tool to ToolHub, designed so that no file data ever leaves the user's browser. Each PDF page is rendered as an image using a pdf.js pipeline, recompressed via a canvas-based quality slider, and reassembled into a new PDF using pdf-lib. Testing on a 4.7MB image-heavy PDF achieved a 72% size reduction, with output verified using pypdf to confirm image integrity. The approach comes with a noted tradeoff: because pages are converted to images, text in the compressed output is no longer selectable or searchable. The tool is recommended for image-heavy or scanned PDFs and openly discloses this limitation to users upfront.

0
ProgrammingDEV Community ·

Google's TimesFM 3.0 Offers Zero-Shot Time Series Forecasting Without Training

Google Research has released TimesFM 3.0, a pretrained foundation model that forecasts time series data without requiring any model training or hyperparameter tuning by developers. Built on a decoder-only transformer architecture similar to GPT, the model processes time series data in 32-step patches rather than individual points, making it efficient over long histories. It was pretrained on over a trillion time points spanning retail, finance, web traffic, and energy sectors, enabling zero-shot forecasting across unseen datasets. The model natively outputs nine quantile estimates at every forecast step, providing built-in prediction intervals without additional configuration. Developers can install and use TimesFM via a simple pip command, passing raw NumPy arrays to receive forecasts, including the latest improvements introduced in the August 2026 version 3.0 release.

0
ProgrammingDEV Community ·

Talent Is Pattern Recognition, Not Memory Capacity, Argues DEV Community Post

A widely discussed piece on DEV Community argues that memory and talent are fundamentally different cognitive abilities, with memory serving merely as storage while talent involves recognizing patterns, building abstractions, and transferring knowledge across domains. The article uses a graph analogy to explain that a truly skilled thinker has fewer but better-connected ideas, rather than many isolated facts. It draws a parallel to machine learning, noting that models — and people — who only memorize training data tend to fail when faced with unfamiliar problems, a phenomenon known as poor generalization. The author contends that real-world problem-solving demands the ability to map new inputs to underlying principles, not just retrieve cached answers. Ultimately, the piece concludes that the ability to discover connections between ideas, not the volume of information retained, is the stronger indicator of mastery.

Developer Builds Browser-Based HEIC Converter That Enforces Strict File Size Limits · ShortSingh