public function rotate( $degree = 90 ) {
		$tokens = $this->wiki->get_tokens();

		$apiArray = array(
			'action' => 'imagerotate',
			'token'  => $tokens['edit'],
			'titles' => $this->title
		);
		pecho( "Rotating image(s) $degree degrees...\n\n", PECHO_NOTICE );

		try{
			$this->preEditChecks( "Rotate" );
		} catch( EditError $e ){
			pecho( "Error: $e\n\n", PECHO_FATAL );
			return false;
		}

		$result = $this->wiki->apiQuery( $apiArray, true );

		if( isset( $result['imagerotate'] ) ) {
			if( isset( $result['imagerotate']['result'] ) && $result['imagerotate']['result'] == "Success" ) {
				$this->__construct( $this->wiki, $this->title );
				return true;
			} else {
				pecho( "Rotate error...\n\n" . print_r( $result['imagerotate'], true ) . "\n\n", PECHO_FATAL );
				return false;
			}
		} else {
			pecho( "Rotate error...\n\n" . print_r( $result, true ), PECHO_FATAL );
			return false;
		}
	}