Gets an <CODE>Image</CODE> with the barcode. A successful call to the method <CODE>generate()</CODE>
before calling this method is required.
@return the barcode <CODE>Image</CODE>
@throws BadElementException on error
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);
    }
830009
public static String getImageUrl(String imgSrc, PageContext pageContext) {
		BinaryResourcesHandler imgRsHandler = (BinaryResourcesHandler) pageContext.getServletContext()
				.getAttribute(JawrConstant.BINARY_CONTEXT_ATTRIBUTE);
		if (null == imgRsHandler)
			throw new JawrLinkRenderingException(
					"You are using a Jawr image tag while the Jawr Image servlet has not been initialized. Initialization of Jawr Image servlet either failed or never occurred.");

		HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();

		HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();

		return getImageUrl(imgSrc, imgRsHandler, request, response);

	}
318868
public function genImage()
    {
        $this->image = imagecreatetruecolor($this->getPxRatio() * 5, $this->getPxRatio() * 5);

        $bg = $this->getBgColor();
        if (!empty($bg)) {
            $background = imagecolorallocate($this->image, $bg[0], $bg[1], $bg[2]);
            imagefill($this->image, 0, 0, $background);
        } else {
            $transparent = imagecolorallocatealpha($this->image, 255, 255, 255, 127);
            imagefill($this->image, 0, 0, $transparent);
            imagesavealpha($this->image, true);
        }
        $color = $this->getColor();
        $color = imagecolorallocate($this->image, $color[0], $color[1], $color[2]);
        $font = __DIR__.DIRECTORY_SEPARATOR.'\fonts\arial.ttf';
        imagettftext($this->image, $this->getPxRatio() * 3, 0, round(($this->getPxRatio() * 5) / 5.5), round(($this->getPxRatio() * 5) / 1.3), $color, $font, $this->getCharacter());

        return $this->image;
    }
755954
function () {
		var Class = this.constructor,
			x, y,
			width = this.getWidth(),
			height = this.getHeight(),
			image = Class.createImage(height, width);

		for (x = 0; x < width; x++) {
			for (y = 0; y < height; y++) {
				image.setPixel(y, width - x - 1, this.getPixel(x, y));
			}
		}

		return image;
	}
347145
public Image getImage() {
		if (attributes == null)
			return null;
		Object obj[] = (Object[]) attributes.get(Chunk.IMAGE);
		if (obj == null)
			return null;
		else {
			return (Image) obj[0];
		}
	}
1237559
protected Bitmap downloadImage() {
        int timesTried = 1;

        while (timesTried <= numRetries) {
            try {
                byte[] imageData = retrieveImageData();

                if (imageData != null) {
                    imageCache.put(imageUrl, imageData);
                } else {
                    break;
                }

                return BitmapFactory.decodeByteArray(imageData, 0, imageData.length);

            } catch (Throwable e) {
                QuickUtils.log.w("download for " + imageUrl + " failed (attempt " + timesTried + ")");
                e.printStackTrace();
                SystemClock.sleep(DEFAULT_RETRY_HANDLER_SLEEP_TIME);
                timesTried++;
            }
        }

        return null;
    }
381363
public ImageIcon getIcon() {
        if (confidence == Alert.CONFIDENCE_FALSE_POSITIVE) {
            // Special case - theres no risk - use the green flag
            return DisplayUtils.getScaledIcon(Constant.OK_FLAG_IMAGE_URL);
        }

        switch (risk) {
        case Alert.RISK_INFO:
            return DisplayUtils.getScaledIcon(Constant.INFO_FLAG_IMAGE_URL);
        case Alert.RISK_LOW:
            return DisplayUtils.getScaledIcon(Constant.LOW_FLAG_IMAGE_URL);
        case Alert.RISK_MEDIUM:
            return DisplayUtils.getScaledIcon(Constant.MED_FLAG_IMAGE_URL);
        case Alert.RISK_HIGH:
            return DisplayUtils.getScaledIcon(Constant.HIGH_FLAG_IMAGE_URL);
        }
        return null;
    }
442278
public java.util.List<String> getImageIds() {
        if (imageIds == null) {
            imageIds = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return imageIds;
    }
501094
public static Intent pickImage() {
        Intent intent = new Intent(Intent.ACTION_PICK);
        intent.setType("image/*");
        return intent;
    }
849934
private BufferedImage getImage(int layer) {
		BufferedImage image = layeredImage[layer];
		if (image == null) {
			createImageAndGraphics(layer);
			image = layeredImage[layer];
		}
		return image;
	}
1346537
public BufferedImage getBufferedImage()
    {
        if (image == null || abort)
            return null;
        
        // no container that would repaint -- wait for the complete image
        if (container == null)
            waitForLoad();
        
        BufferedImage img = new BufferedImage(getIntrinsicWidth(), getIntrinsicHeight(), BufferedImage.TYPE_INT_ARGB);
        Graphics2D g = img.createGraphics();
        g.drawImage(image, null, null);
        g.dispose();

        return img;
    }
1259853
private function createImagineInstance()
    {
        try {
            if (ImagerService::$imageDriver === 'gd') {
                return new \Imagine\Gd\Imagine();
            }

            if (ImagerService::$imageDriver === 'imagick') {
                return new \Imagine\Imagick\Imagine();
            }
        } catch (RuntimeException $e) {
            // just ignore for now
        }

        return null;
    }
389419
@Override
    public ImageIcon getImageIconResource( final String       key,
                                           final ImageIcon    defaultValue )
        throws
            UtilException
    {
        String    imagePath = getFormattedPropValue( key );

        if ( imagePath == null )
        {
            return defaultValue;
        }

        return resourceToImageIcon( imagePath );
    }
1149651
public function getAsImage()
    {
        if ($this->asImage === null) {
            $this->asImage = $this->getGenerator()->generateImage($this);;
        }
        return $this->asImage;
    }
888092
public CmsJspImageBean getToImage() {

        if (m_imageBean == null) {
            try {
                m_imageBean = new CmsJspImageBean(getCmsObject(), getToString());
            } catch (CmsException e) {
                // this should only happen if the image path is not valid, in which case we will return null
                LOG.info(e.getLocalizedMessage(), e);
            }
        }
        return m_imageBean;
    }
737929
public java.awt.Image createAwtImage(Color foreground, Color background) {
        int f = foreground.getRGB();
        int g = background.getRGB();
        Canvas canvas = new Canvas();

        String bCode = code;
        if (extended)
            bCode = getCode39Ex(code);
        if (generateChecksum)
            bCode += getChecksum(bCode);
        int len = bCode.length() + 2;
        int nn = (int)n;
        int fullWidth = len * (6 + 3 * nn) + (len - 1);
        byte bars[] = getBarsCode39(bCode);
        boolean print = true;
        int ptr = 0;
        int height = (int)barHeight;
        int pix[] = new int[fullWidth * height];
        for (int k = 0; k < bars.length; ++k) {
            int w = (bars[k] == 0 ? 1 : nn);
            int c = g;
            if (print)
                c = f;
            print = !print;
            for (int j = 0; j < w; ++j)
                pix[ptr++] = c;
        }
        for (int k = fullWidth; k < pix.length; k += fullWidth) {
            System.arraycopy(pix, 0, pix, k, fullWidth); 
        }
        Image img = canvas.createImage(new MemoryImageSource(fullWidth, height, pix, 0, fullWidth));
        
        return img;
    }
454102
public InputStream generateImage() {
        if (closed) {
            throw new ActivitiImageException("ProcessDiagramGenerator already closed");
        }

        try {
            ByteArrayOutputStream stream = new ByteArrayOutputStream();
            Writer out;
            out = new OutputStreamWriter(stream,
                                         "UTF-8");
            g.stream(out,
                     true);
            return new ByteArrayInputStream(stream.toByteArray());
        } catch (UnsupportedEncodingException | SVGGraphics2DIOException e) {
            throw new ActivitiImageException("Error while generating process image",
                                             e);
        }
    }