Creates and adds imgage (img) element.
@param src Html "src" attribute.
@param alt Html "alt" attribute.
@return Html element.
774373
public Image createImage(String src, String alt) {
    return this.add(new Image(src, alt));
  }
892305
public function addImage($src, $style = null) {
		$image = new PHPWord_Section_Image($src, $style);
		
		if(!is_null($image->getSource())) {
			if($this->_insideOf == 'section') {
				$rID = PHPWord_Media::addSectionMediaElement($src, 'image');
			} elseif($this->_insideOf == 'header') {
				$rID = PHPWord_Media::addHeaderMediaElement($this->_pCount, $src);
			} elseif($this->_insideOf == 'footer') {
				$rID = PHPWord_Media::addFooterMediaElement($this->_pCount, $src);
			}
			$image->setRelationId($rID);
			
			$this->_elementCollection[] = $image;
			return $image;
		} else {
			trigger_error('Source does not exist or unsupported image type.');
		}
	}
1008978
public void setImage(BufferedImage im) {
		icon.setImage(im);
		if (image == null) {
			this.image = im;
//			this.setSize(image.getWidth(), image.getHeight());
			int panelX = image.getWidth(); 
			int panelY = image.getHeight(); 
			panel.setSize(panelX, panelY);

//			Toolkit tk = Toolkit.getDefaultToolkit();  
//			int xSize = ((int) tk.getScreenSize().getWidth());  
//			int ySize = ((int) tk.getScreenSize().getHeight());
			
			try {
				UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
			} catch (ClassNotFoundException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (InstantiationException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (IllegalAccessException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			} catch (UnsupportedLookAndFeelException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
			GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
			Rectangle bounds = ge.getMaximumWindowBounds();

			int deltaX = 30;
			int deltaY = 50;
			int xSize = Math.min(bounds.width, panelX+deltaX);
			int ySize = Math.min(bounds.height, panelY+deltaY);
			
			this.setPreferredSize(new Dimension(xSize, ySize));
			
			this.setResizable(true);
			this.pack();
		}
		this.getContentPane().repaint();
		if (!this.isVisible()) this.setVisible(true);
	}
622116
public static function image($url, $alt = '', $htmlOptions = array())
	{
		// Load assets
		if (!self::$_assetsUrl)
			self::loadAssets();

		// Add the data-src attribute
		if (!isset($htmlOptions['data-src']))
			$htmlOptions['data-src'] = $url;

		// Add the CSS class
		if (isset($htmlOptions['class']))
		{
			$cssClasses = explode(' ', $htmlOptions['class']);

			if (!in_array('lazy', $cssClasses))
				$cssClasses[] = 'lazy';

			$htmlOptions['class'] = implode(' ', $cssClasses);
		}
		else
			$htmlOptions['class'] = 'lazy';

		return \CHtml::image(self::$_assetsUrl.'/images/loader.gif', $alt, $htmlOptions);
	}
1064178
function(url, src) {
		if (src) {
			this._setupsrc(src);
		}
		if (url) {
			this.element.src = url;
		}
		return this.contentLocation.href;
	}
663598
public function createImage($src, $alt = null)
    {
        return $this->image = new Card\Image($src, $alt);
    }
758384
public function htmlimg($src, array $attribs = array(), $internal = true)
    {
        if (isset($attribs['src'])) {
            unset($attribs['src']);
        }

        if ($internal) {
            $src = $this->view->media($src);
        }

        $xhtml = '<img ';
        $xhtml .= 'src="' . $src . '" ';
        $xhtml .= $this->_htmlAttribs($attribs);
        $xhtml .= $this->getClosingBracket();

        return $xhtml;
    }
1319217
protected String escape(final Object src) {

		final StringBuilder output = new StringBuilder();
		final String input         = src.toString();

		for (int i = 0; i < input.length(); i++) {

			final char c        = input.charAt(i);
			final String prefix = SPECIAL_CHARS.get(c);

			if (prefix != null) {
				output.append(prefix);
			}

			output.append(c);
		}

		return output.toString();
	}
354031
public static function imageCircle($src, $alt = '', $htmlOptions = array())
    {
        $htmlOptions['type'] = self::IMAGE_TYPE_CIRCLE;
        return self::image($src, $alt, $htmlOptions);
    }
446288
public function imageTag($source, $alt = null, $attributes = [])
    {
        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];

        // E.g. image_tag('logo.png', "My Logo"); => <img src="http://localhost/assets/logo-f2331bb588d007ba354e5fa406f9f4aa.png" alt="My Logo">
        $alt = $alt ?: humanize(basename($source, ".".File::extension($source)));

        return app('html')->image($this->assetPath($source, $assetsOptions), $alt, $attributes);
    }
1288094
public void setAlt(java.lang.String alt) {
        getStateHelper().put(PropertyKeys.alt, alt);
        handleAttribute("alt", alt);
    }
42532
public static function img( $src = NULL, $options = [] ) {
		if ( ! is_null( $src ) ) {
			$options['src'] = $src;
		}
		
		return static::tag('img', NULL, $options );
	}
1028239
def image(link, title, alt_text)
      # add the querystring to the image
      if @image_parameters.present?
        prefix = link.include?('?') ? '&' : '?'
        link += "#{prefix}#{@image_parameters.to_query}"
      end
      # return a content tag
      content_tag(:img, nil, src: link.to_s, alt: alt_text, title: title)
    end
970138
public function img($src, $alt = '', $class = '', $attributes = [])
    {
        return sprintf('<img src="%s" alt="%s" class="%s" %s>',
            $this->url($src),
            $alt,
            $class,
            $this->HtmlAttributes($attributes)
        );
    }
1262311
public void img(Object base, String localName) throws SAXException {
        output.write(
            "<IMG src='"+res(base,localName)+"'>");
    }
148247
public static function img($src, $attr = array())
	{
		if ( ! preg_match('#^(\w+://)# i', $src))
		{
			$src = \Uri::base(false).$src;
		}
		$attr['src'] = $src;
		$attr['alt'] = (isset($attr['alt'])) ? $attr['alt'] : pathinfo($src, PATHINFO_FILENAME);
		return html_tag('img', $attr);
	}
554181
protected ImageDescriptor imageDescriptor(SarlEvent element) {
		final JvmDeclaredType jvmElement = this.jvmModelAssociations.getInferredType(element);
		return this.images.forEvent(
				element.getVisibility(),
				this.adornments.get(jvmElement));
	}