*/
protected function transformGd( $image, $params ) {
# Use PHP's builtin GD library functions.
- #
# First find out what kind of file this is, and select the correct
# input routine for this.
$binaryHeader = fread( $f, 26 );
fclose( $f );
- # Master image structure:
- #
- # byte[9] "gimp xcf " File type magic
- # byte[4] version XCF version
- # "file" - version 0
- # "v001" - version 1
- # "v002" - version 2
- # byte 0 Zero-terminator for version tag
- # uint32 width With of canvas
- # uint32 height Height of canvas
- # uint32 base_type Color mode of the image; one of
- # 0: RGB color
- # 1: Grayscale
- # 2: Indexed color
- # (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h)
+ /**
+ * Master image structure:
+ *
+ * byte[9] "gimp xcf " File type magic
+ * byte[4] version XCF version
+ * "file" - version 0
+ * "v001" - version 1
+ * "v002" - version 2
+ * byte 0 Zero-terminator for version tag
+ * uint32 width With of canvas
+ * uint32 height Height of canvas
+ * uint32 base_type Color mode of the image; one of
+ * 0: RGB color
+ * 1: Grayscale
+ * 2: Indexed color
+ * (enum GimpImageBaseType in libgimpbase/gimpbaseenums.h)
+ */
try {
$header = wfUnpack(
"A9magic" . # A: space padded
// immediately following the StandardXMP. However, the JPEG standard
// does not require preservation of marker segment order. A robust JPEG
// reader should tolerate the marker segments in any order."
- //
- // otoh the probability that an image will have more than 128k of
- // metadata is rather low... so the probability that it will have
+ // On the other hand, the probability that an image will have more than
+ // 128k of metadata is rather low... so the probability that it will have
// > 128k, and be in the wrong order is very low...
if ( $len['offset'] !== $this->extendedXMPOffset ) {
// In practise I have yet to see a file that
// uses this element, however it is mentioned
// on page 25 of part 1 of the xmp standard.
- //
- // also it seems as if exiv2 and exiftool do not support
+ // Also it seems as if exiv2 and exiftool do not support
// this either (That or I misunderstand the standard)
$this->logger->info( __METHOD__ . ' Encountered <rdf:type> which isn\'t currently supported' );
}