Files
codex/codex-rs/utils/image
T
Curtis 'Fjord' Hawthorne 598125109d image: preserve metadata when resizing prompt images (#27266)
## Summary

- Preserve ICC profiles and EXIF metadata when resizing and re-encoding
prompt images.
- Retain EXIF orientation metadata without rotating or otherwise
modifying the pixel data locally.
- Support metadata preservation for PNG, JPEG, and WebP outputs.
- Continue returning the original bytes when an image does not require
re-encoding.

This intentionally preserves the metadata most important for rendering
prompt images faithfully. Other format-specific metadata is not copied.

## Motivation

Client-side resizing previously discarded image metadata during
re-encoding. This could lose color-profile information and EXIF
orientation needed by downstream image consumers.


#### [git stack](https://github.com/magus/git-stack-cli)
- โœ… `1` https://github.com/openai/codex/pull/27245
- โœ… `2` https://github.com/openai/codex/pull/27247
- โœ… `3` https://github.com/openai/codex/pull/27246
- ๐Ÿ‘‰ `4` https://github.com/openai/codex/pull/27266
598125109d ยท 2026-06-10 21:17:32 -07:00
History
..