library/Garp/Image/Scaler.php
public function generateTemplateScaledImages($filename, $id, $overwrite = false) {
        if (!$filename || !$id) {
            throw new Exception(
                'A filename and id were not provided. Filename [' . $filename . '] Id [' . $id . ']'
            );
        }
        $templates = $this->getTemplateNames();

        foreach ($templates as $t) {
            try {
                $this->scaleAndStore($filename, $id, $t, $overwrite);
            } catch(Exception $e) {
                throw new Exception(
                    "Error scaling " . $filename . " (#" . $id . "): " . $e->getMessage()
                );
            }
        }
    }
public function generateTemplateScaledImages($filename, $id, $overwrite = false) {
        if (!$filename || !$id) {
            throw new Exception(
                'A filename and id were not provided. Filename [' . $filename . '] Id [' . $id . ']'
            );
        }
        $templates = $this->getTemplateNames();

        foreach ($templates as $t) {
            try {
                $this->scaleAndStore($filename, $id, $t, $overwrite);
            } catch(Exception $e) {
                throw new Exception(
                    "Error scaling " . $filename . " (#" . $id . "): " . $e->getMessage()
                );
            }
        }
    }
public function generateTemplateScaledImages ( $ filename , $ id , $ overwrite = false ) { if ( ! $ filename || ! $ id ) { throw new Exception ( 'A filename and id were not provided. Filename [' . $ filename . '] Id [' . $ id . ']' ) ; } $ templates = $ this -> getTemplateNames ( ) ; foreach ( $ templates as $ t ) { try { $ this -> scaleAndStore ( $ filename , $ id , $ t , $ overwrite ) ; } catch ( Exception $ e ) { throw new Exception ( "Error scaling " . $ filename . " (#" . $ id . "): " . $ e -> getMessage ( ) ) ; } } }
Generate versions of an image file that are scaled according to the
configured scaling templates.

@param string $filename  The filename of the image to be scaled
@param int    $id        The database ID of the image record
@param bool   $overwrite Whether to overwrite existing files
@return void
Generate versions of an image file that are scaled according to the configured scaling templates .