SShortSingh.
Back to feed

How C2PA and IPTC Labels Reveal AI-Generated Images in Node.js

0
·8 views

AI image generation tools like OpenAI, Adobe Firefly, and Google embed provenance metadata into image files using two standards: C2PA Content Credentials and IPTC Digital Source Type XMP fields. A developer behind sparkpix.ai has shared how roughly 60 lines of TypeScript can scan raw image bytes to detect these labels and identify the generating tool without requiring full signature validation. The C2PA standard stores a signed manifest in format-specific containers such as JPEG APP11 segments or PNG caBX chunks, while IPTC uses values like trainedAlgorithmicMedia to flag AI-created content. A key coding pitfall is checking for the composite IPTC value before the generated one, since the former contains the latter as a substring. The post also warns that client-side image compression and re-encoding to WebP before upload can silently strip these provenance labels before any server-side detection occurs.

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 ·

How to Send Telegram Bot Messages in PHP Using cURL with Full Error Handling

Developers can send Telegram bot messages using PHP's cURL extension by calling the sendMessage API method over HTTPS. A minimal helper function handles the full request lifecycle, including reading the bot token from an environment variable, building the payload, and setting connection timeouts. The function performs layered error checks: verifying the HTTP status code, safely decoding the JSON response, and confirming that Telegram's 'ok' field returns true. If any of these checks fail, the function throws a descriptive runtime exception to help diagnose the issue. The guide focuses strictly on the sendMessage call and does not cover webhook management, SDK functionality, or state persistence.

0
ProgrammingDEV Community ·

Binance Order Flow Data Boosts Polymarket BTC Trade Accuracy to 70%, Study Finds

A study analyzing 2,833 five-minute Polymarket markets for BTC, ETH, and SOL found that combining the late-stage market leader with Binance aggressive order flow data significantly improved historical prediction accuracy. When price direction and order flow aligned, the market leader won approximately 70.2% of the time, compared to just 57.6% when using price signals alone. Conversely, when price and order flow diverged, the leader won only 41.3% of the time, suggesting the underlying buying or selling pressure told a different story than the price chart. The research proposes an automated trading bot architecture that separates data collection, signal generation, and order execution into distinct components. Researchers cautioned that these figures reflect historical results only and do not guarantee future trading performance.

0
ProgrammingDEV Community ·

Developer Builds Free Browser-Based Fence Calculator Using Vanilla JavaScript

A developer has created a lightweight, browser-based fence calculator called the ItaliaLegacy Fence Calculator, built entirely with HTML, CSS, and vanilla JavaScript. The tool estimates key fencing materials — including sections, panels, posts, and rails — based on user-entered measurements such as total fence length, gate widths, post spacing, and rails per section. All calculations run locally in the browser, meaning no data is sent to a server. The calculator accounts for gate openings by subtracting gate widths from the total fence length before computing material estimates. It is designed as a planning aid rather than a precise purchasing guide, as real-world variables like corners and direction changes can affect actual material needs.

0
ProgrammingDEV Community ·

Kaggle Benchmark Tests AI Models on Booking Conflict Replay Logic

A new Kaggle benchmark called Reservation Replay challenges AI models to correctly handle booking conflicts, specifically testing whether a failed request remains failed even after conditions change. The benchmark uses fictional rooms and integer time intervals across 8 base traces and 4 dependent metamorphic variants, scored by exact trace success without an LLM judge. Google's Gemini 3.7 Flash achieved a perfect 12/12 score, while Gemini 2.5 Flash scored only 4/12, primarily due to output formatting failures rather than logical errors. A scoring policy update was introduced mid-evaluation after Gemini 2.5 Flash triggered a ResponseParsingError, highlighting how format compliance can significantly skew benchmark results. The author cautions that the small pilot size and dependent variants are insufficient to establish stable model rankings, but the reproducible fixtures and preserved run evidence make the findings verifiable.