Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Add tests
  • Loading branch information
Gymnasiast committed Apr 19, 2023
commit 0e13417e8cc6d4069dd303c9c0eae4f3320d7e93
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions ext/gd/tests/imagecreatefrombmp-v3info-32bpp-bitfields-11027.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--TEST--
imagecreatefrombmp() - test image with BITMAPV3INFOHEADER, 32bpp and (unnecessary) bitfields
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!(imagetypes() & IMG_BMP)) die('skip BMP support required');
?>
--FILE--
<?php
// create an image from a BMP file
$im = imagecreatefrombmp(__DIR__ . '/imagecreatefrombmp-v3info-32bpp-bitfields-11027-input.bmp');

include_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/imagecreatefrombmp-v3info-32bpp-bitfields-11027-output.png', $im);
?>
--EXPECT--
The images are equal.
Binary file not shown.
18 changes: 18 additions & 0 deletions ext/gd/tests/imagecreatefrombmp-v5-32bpp-bitfields-11027.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
--TEST--
imagecreatefrombmp() - test image with BITMAPV5HEADER, 32bpp and (unnecessary) bitfields
--EXTENSIONS--
gd
--SKIPIF--
<?php
if (!(imagetypes() & IMG_BMP)) die('skip BMP support required');
?>
--FILE--
<?php
// create an image from a BMP file
$im = imagecreatefrombmp(__DIR__ . '/imagecreatefrombmp-v5-32bpp-bitfields-11027-input.bmp');

include_once __DIR__ . '/func.inc';
test_image_equals_file(__DIR__ . '/imagecreatefrombmp-v3info-32bpp-bitfields-11027-output.png', $im);
?>
--EXPECT--
The images are equal.