Create an IMG element.
@param media Media metadata
@return IMG element with properties
492763
protected HtmlElement<?> getImageElement(Media media) {
    Image img = new Image().addCssClass(MediaNameConstants.CSS_DUMMYIMAGE);
    return img;
  }
652577
private function createMedia()
    {
        if($this->option('media') || $this->option('all')) {
            $this->comment('Creating dummy media...');
            $output = (new \MediaSeeder())
                ->setCommand($this)
                ->run($this->getDefaultOption('media'));
            $this->info($output);
        }
        return $this;
    }
1290676
protected void setAdditionalAttributes(@Nullable HtmlElement<?> mediaElement, @NotNull Media media) {
    if (mediaElement == null) {
      return;
    }
    MediaArgs mediaArgs = media.getMediaRequest().getMediaArgs();
    for (Entry<String, Object> entry : mediaArgs.getProperties().entrySet()) {
      if (StringUtils.equals(entry.getKey(), MediaNameConstants.PROP_CSS_CLASS)) {
        mediaElement.addCssClass(entry.getValue().toString());
      }
      else {
        mediaElement.setAttribute(entry.getKey(), entry.getValue().toString());
      }
    }
  }
1371464
public static BufferedImage createBufferedImage(int width, int height,
			String imageFormat) {

		int imageType;

		switch (imageFormat.toLowerCase()) {
		case IMAGE_FORMAT_JPG:
		case IMAGE_FORMAT_JPEG:
			imageType = BufferedImage.TYPE_INT_RGB;
			break;
		default:
			imageType = BufferedImage.TYPE_INT_ARGB;
		}

		BufferedImage image = new BufferedImage(width, height, imageType);

		return image;
	}
1092017
function(){
                /*
                 * expression
                 *  : '(' S* media_feature S* [ ':' S* expr ]? ')' S*
                 *  ;
                 */
                var tokenStream = this._tokenStream,
                    feature     = null,
                    token,
                    expression  = null;

                tokenStream.mustMatch(Tokens.LPAREN);
                feature = this._media_feature();
                this._readWhitespace();

                if (tokenStream.match(Tokens.COLON)){
                    this._readWhitespace();
                    token = tokenStream.LT(1);
                    expression = this._expression();
                }

                tokenStream.mustMatch(Tokens.RPAREN);
                this._readWhitespace();
                return new MediaFeature(feature, (expression ? new SyntaxUnit(expression, token.startLine, token.startCol) : null));
            }
634516
function() {
		var url = TL.Util.transformImageURL(this.data.url),
			self = this;

		// Create Dom element
		this._el.content_item	= TL.Dom.create("div", "tl-media-item tl-media-iframe", this._el.content);
		var markup = "";
		// not assigning media_id attribute. Seems like a holdover which is no longer used.
		if (TL.Browser.ie || TL.Browser.edge || url.match(/dl.dropboxusercontent.com/)) {
			markup = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='//docs.google.com/viewer?url=" + url + "&amp;embedded=true'></iframe>";
		} else {
			markup = "<iframe class='doc' frameborder='0' width='100%' height='100%' src='" + url + "'></iframe>"
		}
		this._el.content_item.innerHTML	= markup
		this.onLoaded();
	}
102278
public boolean mediaIsImage() {
        String contentType = this.getContentType();
        return contentType != null && this.media != null && contentType.startsWith("image") && !contentType.equals("image/gif");
    }
853170
public MediaType withParameters(Map<String, ? extends Iterable<String>> parameters) {
        final ImmutableListMultimap.Builder<String, String> builder = ImmutableListMultimap.builder();
        for (Map.Entry<String, ? extends Iterable<String>> e : parameters.entrySet()) {
            final String k = e.getKey();
            for (String v : e.getValue()) {
                builder.put(k, v);
            }
        }
        return create(type, subtype, builder.build());
    }
259626
protected JSONObject toReponsiveImageSource(Media media, MediaFormat mediaFormat) {
    String url = buildDummyImageUrl(mediaFormat);
    try {
      JSONObject source = new JSONObject();
      source.put(MediaNameConstants.PROP_BREAKPOINT, mediaFormat.getProperties().get(MediaNameConstants.PROP_BREAKPOINT));
      source.put(ResponsiveImageMediaMarkupBuilder.PROP_SRC, url);
      return source;
    }
    catch (JSONException ex) {
      throw new RuntimeException("Error building JSON source.", ex);
    }
  }
327346
public Image createImage() throws BadElementException {
        if (image == null)
            return null;
        byte g4[] = CCITTG4Encoder.compress(image, width + 2 * ws, height + 2 * ws);
        return Image.getInstance(width + 2 * ws, height + 2 * ws, false, Image.CCITTG4, 0, g4, null);
    }
549186
protected static Sprite createSprite(Media media)
    {
        final Sprite sprite = Drawable.loadSprite(media);
        sprite.load();
        sprite.prepare();
        return sprite;
    }
694432
public function addMedia(Media $media)
	{
		$this->media[] = $media;
		$media->addGallery($this);

		return $this;
	}
910127
public MultipartBuilder type(MediaType type) {
        if (type == null) {
            throw new NullPointerException("type == null");
        }
        if (!type.type().equals("multipart")) {
            throw new IllegalArgumentException("multipart != " + type);
        }
        this.type = type;
        return this;
    }
1032233
public boolean mediaIsGIF () {
        String contentType = this.getContentType();
        return contentType != null && this.media != null && contentType.equals("image/gif");
    }
768617
public @NotNull MediaArgs mediaFormat(MediaFormat value) {
    if (value == null) {
      this.mediaFormats = null;
    }
    else {
      this.mediaFormats = new MediaFormat[] {
          value
      };
    }
    return this;
  }
90548
public void setMedia(String media) throws FlickrException {
        if (media.equals("all") || media.equals("photos") || media.equals("videos")) {
            this.media = media;
        } else {
            throw new FlickrException("0", "Media type is not valid.");
        }
    }
729018
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "usesImageDatum")
    public JAXBElement<ImageDatumRefType> createUsesImageDatum(ImageDatumRefType value) {
        return new JAXBElement<ImageDatumRefType>(_UsesImageDatum_QNAME, ImageDatumRefType.class, null, value);
    }