Apply all defined actions to the source image
@throws RuntimeException
488984
protected function applyActionsImage()
    {
        $actions = $this->image_style->getActions($this->data_imagestyle_id);

        if (empty($actions)) {
            throw new RuntimeException('No image style actions to apply');
        }

        $this->image_style->applyActions($actions, $this->data_source_file, $this->data_cached_file);
    }
685721
private void updateDefaultActions(String targetRootPath) {

        if (m_actionCombo != null) {
            m_defaultActions.clear();
            String resPath = m_context.getResources().get(0).getRootPath();
            String parentFolder = CmsResource.getParentFolder(resPath);
            if ((DialogMode.copy_and_move == m_dialogMode) && !parentFolder.equals(targetRootPath)) {
                m_defaultActions.clear();
                m_defaultActions.add(Action.move);
            } else if (m_context.getResources().size() == 1) {
                if (m_context.getResources().get(0).isFile()) {
                    m_defaultActions.add(Action.copy_all);
                } else {
                    m_defaultActions.add(Action.copy_sibling_mixed);
                    if (m_hasContainerPageDefaultFile) {
                        m_defaultActions.clear();
                        m_defaultActions.add(Action.container_page_automatic);
                        m_defaultActions.add(Action.container_page_copy);
                        m_defaultActions.add(Action.container_page_reuse);
                    }
                    CmsResource folder = m_context.getResources().get(0);
                    if (CmsResourceTypeFolderSubSitemap.isSubSitemap(folder)) {
                        m_defaultActions.clear();
                        m_defaultActions.add(Action.sub_sitemap);
                    }
                }
            } else {
                m_defaultActions.add(Action.copy_sibling_mixed);
            }
            if (!m_defaultActions.isEmpty()) {
                m_actionCombo.setValue(m_defaultActions.get(0));
            }
            m_actionCombo.markAsDirty();
        }
    }
1057843
public function setActions($actions)
    {
        if ($this->getState() != self::INIT) {
            throw new \RuntimeException('Invalid state.');
        }

        if (count($actions) == 0) {
            $this->setState(self::INVALID);
            throw new \RuntimeException('No actions given.');
        }

        $this->actions = array_combine($actions, $actions);
        $this->setState(self::REGISTER);

        return $this;
    }
730973
public function editImage($action)
    {
        $image = $this->loadImage();

        $path = $this->processImage($action, $image);

        $this->changeImagePath($path);
    }
873252
private void initImage(TypedArray attrs) {
		int index = R.styleable.ActionButton_image;
		if (attrs.hasValue(index)) {
			image = attrs.getDrawable(index);
			LOGGER.trace("Initialized Action Button image");
		}
	}
961589
public function actionImageResize() {
		$source = $this->getSource();

		$this->accessControl->checkPermission($this->getUserRole(), $this->action, $source->getPath());

		$info = $this->getImageEditorInfo();

		if (!$info->box || (int)$info->box->w <= 0) {
			throw new \Exception('Width not specified', Consts::ERROR_CODE_BAD_REQUEST);
		}

		if (!$info->box || (int)$info->box->h <= 0) {
			throw new \Exception('Height not specified', Consts::ERROR_CODE_BAD_REQUEST);
		}


		$info->img
			->resize((int)$info->box->w, (int)$info->box->h)
			->save($info->path . $info->newname, $source->quality);
	}
1187441
public function setNeededAction($neededAction)
    {
        if (!in_array($neededAction, static::$allowedNeededActions))
        {
            throw new RuntimeException("Unknown needed action: '{$neededAction}'");
        }

        $this->neededAction = $neededAction;

        return $this;
    }
90434
private void processImageOuter( ImageBase image ) {
		long startTime = System.currentTimeMillis();

		// this image is owned by only this process and no other. So no need to lock it while
		// processing
		processImage(image);

		// If an old image finished being processes after a more recent one it won't be visualized
		if( !visualizeOnlyMostRecent || startTime > timeOfLastUpdated ) {
			timeOfLastUpdated = startTime;

			// Copy this frame
			renderBitmapImage(bitmapMode,image);

			// Update the visualization
			runOnUiThread(() -> displayView.invalidate());
		}

		// Put the image into the stack if the image type has not changed
		synchronized (boofImage.imageLock) {
			if( boofImage.imageType.isSameType(image.getImageType()))
				boofImage.stackImages.add(image);
		}
	}
561560
def refresh( self ):
        
        self.clear()
        
        for i, filename in enumerate(self.filenames()):
            name   = '%i. %s' % (i+1, os.path.basename(filename))
            action = self.addAction(name)
            action.setData(wrapVariant(filename))
677276
public function process()
    {
        parent::process();

        $cmd = $this->compile();
        $this->runCmd(
            $cmd,
            '\Thapp\JitImage\Exception\ImageProcessException',
            function ($stderr) {
                $this->clean();
            },
            ['#', PHP_EOL]
        );
    }
917504
def addAction(self, action):
        
        super(XDockToolbar, self).addAction(action)
        
        label = XDockActionLabel(action, self.minimumPixmapSize(), self)
        label.setPosition(self.position())
        
        layout = self.layout()
        layout.insertWidget(layout.count() - 1, label)
681580
public void run()
    {
        String sourceDir = this.getProperty(SOURCE_DIR);
        sourceDir = ConvertBase.fixFilePath(sourceDir, File.separator);
        this.setProperty(SOURCE_DIR, sourceDir);
        
        String destDir = this.getProperty(DEST_DIR);
        destDir = ConvertBase.fixFilePath(destDir, File.separator);
        if (destDir != null)
        	if (destDir.equals(sourceDir))
        		destDir += "out";
        this.setProperty(DEST_DIR, destDir);
        
        String strSourcePackage = this.getProperty(SOURCE_PACKAGE);
        if (strSourcePackage == null)
        	strSourcePackage = ConvertBase.fixFilePath(sourceDir, ".");
        String strDestPackage = this.getProperty(DEST_PACKAGE);
        if (strDestPackage == null)
        	strDestPackage = ConvertBase.fixFilePath(destDir, ".");

        sourceDir = this.getFullPath(sourceDir);

        File fileDir = new File(sourceDir);
        
        if (fileDir.isDirectory())
            this.moveDirectory(fileDir, null);
    }
839239
@Override
    public void actionPerformed(ActionEvent event) {
        if (event.getSource().equals(LED_BLINKING_TIMER)) {
            currentLedImage = ledOn == true ? getLedImageOn() : getLedImageOff();
            ledOn ^= true;

            repaint();
        }
    }
764070
def actions_for_project(self, project):
        """"""
        project.cflags = ["-O3", "-fno-omit-frame-pointer"]
        project.runtime_extension = time.RunWithTime(
            run.RuntimeExtension(project, self))
        return self.default_runtime_actions(project)
1182881
@Override
    public void actionPerformed(final ActionEvent EVENT) {
        if (lcdTextX > (lcdImage.getWidth() + VALUE_BOUNDARY.getWidth())) {
            lcdTextX = -VALUE_BOUNDARY.getBounds().width;
        }
        lcdTextX += 1;
        if (EVENT.getSource().equals(LCD_BLINKING_TIMER)) {
            lcdTextVisible ^= true;
        }
        repaint(getInnerBounds());
    }
906165
protected function initialize()
    {
        $info         = getimagesize($this->path);
        $this->width  = $info[0];
        $this->height = $info[1];
        $this->pixels = $this->width * $this->height;
        $type         = $info[2];

        switch ($type) {
            case IMAGETYPE_JPEG:
                $this->image = imagecreatefromjpeg($this->path);
                break;
            case IMAGETYPE_GIF;
                $this->image = imagecreatefromgif($this->path);
                break;
            case IMAGETYPE_PNG;
                $this->image = imagecreatefrompng($this->path);
                break;
            default:
                throw new \RuntimeException('Unsupport image type ' . $type);
        }

        imagealphablending($this->image, false);
    }
460439
public function generate()
    {
        if (!is_dir($this->getInputDirectory())) {
            throw new \RuntimeException('The MakeDocs input directory does not exist.');
        }

        if (!$this->builders) {
            throw new \RuntimeException('No MakeDocs builders present.');
        }

        // First we change the working directory to the input, this makes rendering easier since
        // all paths are relative to source directory:
        $workingDirectory = getcwd();
        chdir($this->getInputDirectory());

        foreach ($this->builders as $builder) {
            $builder->build($this);
        }

        // Restore the working directory to its original form:
        chdir($workingDirectory);
    }