Creates this image.

@param format The image format for the new image.
@param size The virtual size of the new image.
762505
public void create(@Nonnull QEmuImageFormat format, @Nonnegative long size) throws IOException {
        ProcessBuilder builder = new ProcessBuilder("qemu-img", "create", "-f", format.name(), file.getAbsolutePath(), String.valueOf(size));
        Process process = builder.start();
        ByteStreams.copy(process.getInputStream(), System.err);
    }
1299179
public String format(String format)
  {
    CharBuffer cb = new CharBuffer();

    return format(cb, format).close();
  }
1207148
protected void applyStyle(TextFormatting format)
	{
		if (format == TextFormatting.RESET)
		{
			FontOptions fontOptions = styles.getFirst();
			styles.clear();
			styles.add(fontOptions);
			return;
		}

		FontOptionsBuilder builder = currentStyle().toBuilder();
		builder.styles(format);
		styles.add(builder.build());
	}
24341
public static int resizeImage(BufferedImage inputImage, String dest, int width, int height, float quality)
			throws IOException {
		BufferedImage outputImage = Scalr.resize(inputImage, Scalr.Method.QUALITY, Scalr.Mode.AUTOMATIC, width, height,
				Scalr.OP_ANTIALIAS);
		return writeImage(dest, outputImage, 0.9f);
	}
513268
public function format($format)
    {
        if (!$this->image) {
            $this->image();
        }

        $this->format = $format;

        return $this;
    }
791288
public void setData(BufferedImage image, String imageFormat, Float quality)
			throws IOException {
		setData(ImageUtils.writeImageToBytes(image, imageFormat, quality));
	}
405062
@Nonnull
    public BufferedImage createBufferedImage(final int imageWidth, final int imageHeight) {
        return new BufferedImage(imageWidth, imageHeight, BufferedImage.TYPE_4BYTE_ABGR);
    }
1018453
function (format) {
        if (!this.image || !this.size) return null;

        format = format || "image/png";
        var canvas = document.createElement("canvas");
        var context = canvas.getContext("2d");
        context.canvas.width = this.size.w;
        context.canvas.height = this.size.h;

        var imgData = context.createImageData(this.size.w, this.size.h);
        for (var i = 0; i < this.image.length; i++) {
            imgData.data[i] = this.image[i];
        }
        context.putImageData(imgData, 0, 0);
        
        return canvas.toDataURL(format);
    }
914763
public void setFormat(final String format) {
        if (format == null && this.format == null) {
            return;
        } else if (format == null) {
            removeChild(this.format);
            this.format = null;
        } else if (this.format == null) {
            this.format = new KeyValueNode<String>(CommonConstants.CS_FORMAT_TITLE, format);
            appendChild(this.format, false);
        } else {
            this.format.setValue(format);
        }
    }
406551
public void setSize( String size, boolean isProperty ) {
        this.size = size;
        if (isProperty) {
            graphic.setSize(ff.property(size));
        } else {
            graphic.setSize(ff.literal(size));
        }
    }
462215
protected BufferedImage create_FRAME_Image(final int WIDTH, final int HEIGHT, final BufferedImage IMAGE) {
        return FRAME_FACTORY.createLinearFrame(WIDTH, HEIGHT, getFrameDesign(), getCustomFrameDesign(), getFrameBaseColor(), isFrameBaseColorEnabled(), getFrameEffect(), IMAGE);
    }
395341
public java.awt.Graphics2D createGraphics(float width, float height, boolean convertImagesToJPEG, float quality) {
        return new PdfGraphics2D(this, width, height, null, false, convertImagesToJPEG, quality);
    }
306718
protected function setFormat($format = null)
    {
        if ($format == '' && $this->image instanceof Image) {
            $format = $this->image->mime;
        }

        $this->format = $format ? $format : 'jpg';

        return $this;
    }
2208
public T createImage( int width , int height ) {
		switch( family ) {
			case GRAY:
				return (T)GeneralizedImageOps.createSingleBand(getImageClass(),width,height);

			case INTERLEAVED:
				return (T)GeneralizedImageOps.createInterleaved(getImageClass(), width, height, numBands);

			case PLANAR:
				return (T)new Planar(getImageClass(),width,height,numBands);

			default:
				throw new IllegalArgumentException("Type not yet supported");
		}
	}
635286
protected CmsFormatterBean createFormatterBean(Format format, boolean isPreview) {

        if (format.hasNoContainerSettings()) {
            return new CmsFormatterBean(
                CmsResourceTypeFunctionConfig.FORMATTER_PATH,
                m_functionFormatter.getStructureId(),
                m_resource.getRootPath(),
                isPreview);
        } else {
            CmsFormatterBean result = new CmsFormatterBean(
                format.getType(),
                CmsResourceTypeFunctionConfig.FORMATTER_PATH,
                format.getMinWidth(),
                format.getMaxWidth(),
                "" + isPreview,
                "false",
                m_resource.getRootPath());
            result.setJspStructureId(m_functionFormatter.getStructureId());
            return result;
        }
    }
194745
@SuppressWarnings("resource")
	protected static final String format(final double toFormat) {
		return new Formatter(Locale.US).format(FLOATFORMAT, toFormat)
				.toString();
	}
15198
public java.awt.Graphics2D createGraphicsShapes(float width, float height) {
        return new PdfGraphics2D(this, width, height, null, true, false, 0);
    }