Set the share absolute image URL.

@param string $image Absolute image URL
341765
public function setImage($image, $getAndSetDimensions = true)
    {
        $this->set('image', $image);
        if ($getAndSetDimensions) {
            $imageSize = $this->container->get(ImageService::class)->getImageSize($image);
            if (is_array($imageSize) && count($imageSize)) {
                $this->set('og:image:width', $imageSize[0], true);
                $this->set('og:image:height', $imageSize[1], true);
            }
        }
    }
920825
public function setImageUrl(string $imageUrl): self
    {
        $this->checkContentType();
        $this->isValidUrl($imageUrl);
        $this->imageUrl = $imageUrl;

        return $this;
    }
566408
public void setImage(BufferedImage image) {
		this.image = image;
		setPreferredSize(new Dimension(image.getWidth(), image.getHeight()));
		setSize(new Dimension(image.getWidth(), image.getHeight()));
		getParent().repaint(0);
	}
535913
public function execute($image)
    {
        $filling = $this->argument(0)->value();
        $x = $this->argument(1)->type('digit')->value();
        $y = $this->argument(2)->type('digit')->value();

        $width = $image->getWidth();
        $height = $image->getHeight();
        $resource = $image->getCore();

        try {

            // set image tile filling
            $source = new Decoder;
            $tile = $source->init($filling);
            imagesettile($image->getCore(), $tile->getCore());
            $filling = IMG_COLOR_TILED;

        } catch (\Hail\Image\Exception\NotReadableException $e) {

            // set solid color filling
            $color = new Color($filling);
            $filling = $color->getInt();
        }

        imagealphablending($resource, true);

        if (is_int($x) && is_int($y)) {

            // resource should be visible through transparency
            $base = $image->getDriver()->newImage($width, $height)->getCore();
            imagecopy($base, $resource, 0, 0, 0, 0, $width, $height);

            // floodfill if exact position is defined
            imagefill($resource, $x, $y, $filling);

            // copy filled original over base
            imagecopy($base, $resource, 0, 0, 0, 0, $width, $height);

            // set base as new resource-core
            $image->setCore($base);
            imagedestroy($resource);

        } else {
            // fill whole image otherwise
            imagefilledrectangle($resource, 0, 0, $width - 1, $height - 1, $filling);
        }

        isset($tile) ? imagedestroy($tile->getCore()) : null;

        return true;
    }
1355676
public function execute($image)
    {
        // destroy image core
        imagedestroy($image->getCore());

        // destroy backups
        foreach ($image->getBackups() as $backup) {
            imagedestroy($backup);
        }

        return true;
    }
1253575
public function setFolder($folder)
    {
        if (substr($folder, strrpos($folder, '/')) !== strlen($folder)) {
            $folder .= '/';
        }
        $this->folder = $folder;
    }
69263
public function setImage(\Core\Entity\Image $image = null) {
        $this->image = $image;

        return $this;
    }
420356
public function url($image, ?string $alt = null, array $extra = [], bool $default = false): ?string
    {
        return $this->generateImagePayload($image, $alt, $extra, $default)->url ?? null;
    }
1043279
public static function addAlpha($image, $isBlend = true)
    {
        imagesavealpha($image, true);
        imagealphablending($image, $isBlend);
    }
339655
public function image($image = null)
    {
        if (null === $image) {
            return $this->image;
        }

        $this->image = $image;

        return $this;
    }
470203
public function fill($image) {
        $fill = $this->getConfig('fill');
        $r = $fill[0];
        $g = $fill[1];
        $b = $fill[2];
        $a = isset($fill[3]) ? $fill[3] : 127;

        imagefill($image, 0, 0, imagecolorallocatealpha($image, $r, $g, $b, $a));

        return $image;
    }
1329833
private function preserveTransparency($image)
    {
        $transparencyColor = array(0, 0, 0);

        switch ($this->type) {
            case \IMAGETYPE_GIF:
                $color = imagecolorallocate($image, $transparencyColor[0], $transparencyColor[1], $transparencyColor[2]);

                imagecolortransparent($image, $color);
                imagetruecolortopalette($image, false, 256);
            break;

            case \IMAGETYPE_PNG:
                imagealphablending($image, false);

                $color = imagecolorallocatealpha($image, $transparencyColor[0], $transparencyColor[1], $transparencyColor[2], 0);

                imagefill($image, 0, 0, $color);
                imagesavealpha($image, true);
            break;
        }
    }
1351108
public function flatten(&$image){

        if($image->isAnimated()) {
            $old = $image->getCore();
            $gift = new GifHelper();
            $hex  = $gift->encode($image->getBlocks());
            $gd   = imagecreatefromstring(pack('H*', $hex)); // Recreate resource from blocks

            imagedestroy( $old ); // Free resource
            $image = new Image(
                $gd,
                $image->getImageFile(),
                $image->getWidth(),
                $image->getHeight(),
                $image->getType(),
                '', // blocks
                false // animated
            );
        }
        return $this;
    }
243775
public function removeImage(Image $image)
    {
        if ($this->images->contains($image)) {
            $this->images->removeElement($image);
            $image->setItem(null);
        }

        return $this;
    }
722042
public function updateURL(&$url) {
		if($this->owner instanceof \Image_Cached || $this->owner instanceof \CdnImage_Cached) {
			return; /** handled in @link ImageCachedExtension */
		}

        // in the CMS, we do _not_ change the asset
        $controller = Controller::has_curr() ? Controller::curr() : null;
        if ($controller instanceof LeftAndMain) {
            return;
        }

        if ($this->owner->CanViewType && $this->owner->getViewType() != CDNFile::ANYONE_PERM) {
            return;
        }

        $cdnLink = $this->getCdnLink();
        if ($cdnLink) {
            $url = $cdnLink;
        }
	}
282734
public function load($image)
  {
    $this->reset();

    $this->image = $this->makeGD($image);

    $this->updateDimensions();
  }
943931
private static function encode($image)
    {
        // 网址 ?

        // 本地路径 ? is_file file_exists()

        // base64 编码 ? not support

        // 文件内容 ?

        // 资源 ? is_resource

        // SplFileInfo ? instanceof SplFileInfo

        $content = Is::is_image($image, null, true);

        if ($content) {
            return $content;
        } else {
            throw new TencentAIException(90301);
        }
    }