public function writeToMemory(): string
    {
        Utils::debugLog('writeToMemory', [
            'instance' => $this,
            'arguments' => []
        ]);

        $result = vips_image_write_to_memory($this->image);
        if ($result === -1) {
            self::errorVips();
        }

        Utils::debugLog('writeToMemory', ['result' => $result]);

        return $result;
    }