Skip to content

Instantly share code, notes, and snippets.

@cmb69

cmb69/77270.c Secret

Last active Dec 11, 2018
Embed
What would you like to do?
PHP bug #77270
#include <gd.h>
int main()
{
FILE *fp;
gdImagePtr im1, im2;
fp = fopen("77270.png", "r");
im1 = gdImageCreateFromPng(fp);
im2 = gdImageCreateFromPng(fp);
fclose(fp);
gdImagePaletteToTrueColor(im1);
gdImageColorMatch(im1, im2);
gdImageDestroy(im1);
gdImageDestroy(im2);
}
<?php
$filename = __DIR__ . '/77270.png';
$im1 = imagecreatefrompng($filename);
imagepalettetotruecolor($im1);
$im2 = imagecreatefrompng($filename);
imagecolormatch($im1, $im2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment