diff --git a/src/lib/Image.php b/src/lib/Image.php
index <HASH>..<HASH> 100644
--- a/src/lib/Image.php
+++ b/src/lib/Image.php
@@ -28,7 +28,7 @@ class Image
   const CHUNK_OVERHEAD_BYTES = 12; // length + type + CRC
 
   const MAX_KEYWORD_BYTES = 79;
-  const NULL_SEPARATOR = '\0';
+  const NULL_SEPARATOR = "\0";
   const IEND_CHUNK_BYTES = 12;
 
   private $_contents;
@@ -117,10 +117,11 @@ class Image
     // Build up data field
     $data = $key;
     $data .= self::NULL_SEPARATOR;
-    $data .= '0'; // Compression flag
-    $data .= '0'; // Compression method
+    $data .= self::NULL_SEPARATOR; // Compression flag
+    $data .= self::NULL_SEPARATOR; // Compression method
     $data .= $language; // Language tag
     $data .= self::NULL_SEPARATOR;
+    $data .= self::NULL_SEPARATOR;
     $data .= $text;
 
     $this->addChunk('iTXt', $data);
Use correct null separator and NULL instead of zero in compression

Need to use double quotes for NULL character otherwise it will be interpreted as the literal string '\0' (i.e. backslash followed by a zero).

PNG specification states: 'The compression flag is 0 for uncompressed text' (s<I>) but PNG viewers seem to require the NULL character (and GIMP uses this when saving its own 'Created by GIMP' iTXt chunk).