/**
		 * apply automatic modifications of the uploaded images as specified in a ClusterTemplateItem.
		 */
		function applyAutoMod($filename) {
			global $c;
			$maxwidth = $this->pgnref->getOption("TEXT1");
			$maxheight = $this->pgnref->getOption("TEXT2");
			
			if (($maxwidth != "") || ($maxheight != "")) {
				$imageapi = new NXImageApi($c["devfilespath"]."orig_".$filename, $c["devfilespath"].$filename);
				if (stristr($maxwidth, "%") && stristr($maxheight, "%")) {
					$imageapi->resizeRelative($maxwidth, $maxheight);
				} else if (is_numeric($maxwidth) && is_numeric($maxwidth)) {
					$imageapi->resizeAbsolute($maxwidth, $maxheight);
				}
				$imageapi->save();
			}
		}