Skip to content

Stdlib: imagecreatetruecolor raster + PNG emit for ext/gd (#3496)#18536

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-3496-gd-imagecreatetruecolor
Jul 13, 2026
Merged

Stdlib: imagecreatetruecolor raster + PNG emit for ext/gd (#3496)#18536
PurHur merged 1 commit into
masterfrom
agent/issue-3496-gd-imagecreatetruecolor

Conversation

@PurHur

@PurHur PurHur commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Implement imagecreatetruecolor(), imagecolorallocate(), imagefill(), and imagedestroy() in ext/gd/ using a PHP-in-PHP truecolor raster model (no libgd drawing).
  • Add VmGdPng minimal PNG encoder so imagepng() emits valid bytes from raster canvases (decode-from-string path unchanged).
  • Spine + inventory sync for four new ext/gd/ units.

php-src reference

Verification

php bin/vm.php test/repro/maintainer_gap_gd_imagecreatetruecolor.php
# ok

php bin/vm.php test/compliance/cases/stdlib/gd_imagecreate.phpt
# ok

php script/check-selfhost-spine-coverage-sync.php
# OK (spine covers all 4755 inventory files)

./script/phpunit.sh --filter 'BootstrapSelfhostBundleTest::testCompilerLibSpineSmokeBundleUnitCountAndKeyUnits'
# OK (1 test, 478 assertions)

Closes #3496

Made with Cursor

Implement PHP-in-PHP truecolor canvas drawing (allocate, fill, destroy) with a minimal PNG encoder so imagepng() round-trips without libgd. Unblocks GD thumbnail pipelines that start from a blank canvas.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur PurHur merged commit 07458b2 into master Jul 13, 2026
1 check failed
@PurHur PurHur deleted the agent/issue-3496-gd-imagecreatetruecolor branch July 13, 2026 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stdlib: ext/gd — imagecreate / imagepng baseline (ext/gd/gd.c parity)

1 participant