Retrieves the image format for the image format code.

@param code
Code.
@return The {@link ImageFormat}, or null.
481172
private ImageFormat getImageFormatForCode(String code) {
        if (code == null || imageFormats == null) {
            return null;
        }
        for (ImageFormat oneImageFormat : imageFormats) {
            if (code.equalsIgnoreCase(oneImageFormat.getCode())) {
                return oneImageFormat;
            }
        }
        return null;
    }
160712
public java.lang.String getImage() {
    java.lang.Object ref = image_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      image_ = s;
      return s;
    }
  }
310087
public String getMessage(final String code) {
        assert code != null;
        
        MissingResourceException error = null;
        
        ResourceBundle[] bundles = getBundles();
        
        for (int i=0; i<bundles.length; i++) {
            try {
                return bundles[i].getString(code);
            }
            catch (MissingResourceException e) {
                //
                // FIXME: For now just save the first error, should really roll a new message with all of the details
                //
                
                if (error != null) {
                    error = e;
                }
            }
        }
        
        assert error != null;
        
        throw error;
    }
526662
public static String getText(String code, Object... args) {
        return getText(code, args, localeContext);
    }
676677
protected function _getImageData( $code, &$mime )
	{
		$list = str_split( ltrim( $code, '#' ), 2 );

		if( count( $list ) !== 3 ) {
			throw new Exception( sprintf( 'Invalid color code "%1$s"', $code ) );
		}

		if( ( $img = imagecreate( 1, 1 ) ) === false ) {
			throw new Exception( 'Unable to create image' );
		}

		if( imagecolorallocate( $img, hexdec( $list[0] ), hexdec( $list[1] ), hexdec( $list[2] ) ) === false ) {
			throw new Exception( 'Unable to allocate color' );
		}

		try
		{
			ob_start();

			if( function_exists( 'imagegif' ) === true && imagegif( $img ) === true ) {
				$mime = 'image/gif';
			} else if( function_exists( 'imagepng' ) === true && imagepng( $img ) === true ) {
				$mime = 'image/png';
			} else {
				throw new Exception( 'Unable to create image. php-gd not installed?' );
			}

			$image = ob_get_contents();
			ob_end_clean();
		}
		catch( Exception $e )
		{
			ob_end_clean();
			throw $e;
		}

		if( imagedestroy( $img ) === false ) {
			throw new Exception( 'Unable to destroy image' );
		}

		return 'data:' . $mime . ';base64,' . base64_encode( $image );
	}
1073016
public function getSectionType($section, $code)
    {
        if (!isset($this->types[$section])) {
            return null;
        }

        $types = array_filter(
            $this->types[$section],
            function (ImageType $item) use ($code) {
                return strtolower($code) === strtolower($item->getCode());
            }
        );

        return array_values($types)[0];
    }
786607
@Override
    public WxResp card_code_get(String code, String cardId) {
    	return card_code_get(code, cardId, null);
    }
1062432
public Collection<ModePage> get(byte pageCode)
   {
      if (this.contains(pageCode))
         return this.pages.get(pageCode).values();
      else
         return null;
   }
478913
public String getMimeType() {
		if (format != null) {
			if (format == Format.JPEG && progressive)
			{
				return "image/pjpeg";
			}
			return format.getMimeType();
		} else {
			return null;
		}
	}
1316611
public function get_code_image($code=''){
		if ($code=='') $code = $this->_logincode;
		if (!$code) return false;
		return 'http://login.weixin.qq.com/qrcode/'.$this->_logincode.'?t=webwx';
	}
760992
public static Image getClipboardImage() {
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        try {
            return (Image) clipboard.getData(DataFlavor.imageFlavor);
        } catch (Exception e) {
            return null;
        }
    }
775565
public Class<?> getJavaType() {
		if(javaType==null) {
			javaType=JKTypeMapping.getType(getCode()).getClass();
			if(javaType==null) {
				JK.error("JKType cannot by null, and code not avaiable %s",code);
			}
		}
		return javaType;
	}
693961
public String getHtmlCode()
	{
		Object[] _params =
		{
			SgmlUtils.generateAttribute(HtmlUtils.AttributeNames.VALUE, getValue())
		};
		MessageFormat _format = (isSelected()) ? FORMAT__SELECTED : FORMAT__NOT_SELECTED;
		return _format.format(_params);
	}
1115374
public static String getImageFileFormat(File imageFile) {
        String imageFileName = imageFile.getName();
        String imageFormat = imageFileName.substring(imageFileName.lastIndexOf('.') + 1);
        if (imageFormat.matches("(pbm|pgm|ppm)")) {
            imageFormat = "pnm";
        } else if (imageFormat.matches("(jp2|j2k|jpf|jpx|jpm)")) {
            imageFormat = "jpeg2000";
        }
        return imageFormat;
    }
1260029
@Override
	public Image createImage(String code) {
		// 图像buffer
		final BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
		final Graphics2D g = GraphicsUtil.createGraphics(image, ObjectUtil.defaultIfNull(this.background, Color.WHITE));

		// 干扰线
		drawInterfere(g);

		// 字符串
		drawString(g, code);

		return image;
	}
159285
@Nullable public de.uniulm.omi.cloudiator.flexiant.client.domain.Image getImage(
        final String imageUUID) throws FlexiantException {
        final io.github.cloudiator.flexiant.extility.Image image =
            this.getResource(imageUUID, ResourceType.IMAGE,
                io.github.cloudiator.flexiant.extility.Image.class);
        if (image == null) {
            return null;
        }
        return new de.uniulm.omi.cloudiator.flexiant.client.domain.Image(image);
    }
281472
public List
getOptions(int code) {
	if (options == null)
		return Collections.EMPTY_LIST;
	List list = Collections.EMPTY_LIST;
	for (Iterator it = options.iterator(); it.hasNext(); ) {
		EDNSOption opt = (EDNSOption) it.next();
		if (opt.getCode() == code) {
			if (list == Collections.EMPTY_LIST)
				list = new ArrayList();
			list.add(opt);
		}
	}
	return list;
}