- "A9magic" # A: space padded
- . "/a5version" # a: zero padded
- . "/Nwidth" # \
- . "/Nheight" # N: unsigned long 32bit big endian
- . "/Nbase_type" # /
- , $binaryHeader
+ "A9magic" . # A: space padded
+ "/a5version" . # a: zero padded
+ "/Nwidth" . # \
+ "/Nheight" . # N: unsigned long 32bit big endian
+ "/Nbase_type", # /
+ $binaryHeader
# Check values
if ( $header['magic'] !== 'gimp xcf' ) {
wfDebug( __METHOD__ . " '$filename' has invalid magic signature.\n" );
# Check values
if ( $header['magic'] !== 'gimp xcf' ) {
wfDebug( __METHOD__ . " '$filename' has invalid magic signature.\n" );
# Forge a return array containing metadata information just like getimagesize()
# See PHP documentation at: http://www.php.net/getimagesize
$metadata = array();
$metadata[0] = $header['width'];
$metadata[1] = $header['height'];
# Forge a return array containing metadata information just like getimagesize()
# See PHP documentation at: http://www.php.net/getimagesize
$metadata = array();
$metadata[0] = $header['width'];
$metadata[1] = $header['height'];
$metadata[3] = sprintf(
'height="%s" width="%s"', $header['height'], $header['width']
);
$metadata['mime'] = 'image/x-xcf';
$metadata['channels'] = null;
$metadata[3] = sprintf(
'height="%s" width="%s"', $header['height'], $header['width']
);
$metadata['mime'] = 'image/x-xcf';
$metadata['channels'] = null;