forked from 1b-agent/opencadstudio-upstream
The brightness/contrast cache keyed entries by the source buffer's address without holding it, so a reloaded image whose new buffer landed at the freed address could be shown with the old file's pixels. Each entry now holds its source. The new functions had also been inserted between resolve_image's doc comment and the function, merging that text into the lookup table's documentation; it is back where it belongs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>