private function getSaveOptions($extension, $transform): array
    {
        /** @var ConfigModel $settings */
        $config = ImagerService::getConfig();

        switch (mb_strtolower($extension)) {
            case 'jpg':
            case 'jpeg':
                return ['jpeg_quality' => $config->getSetting('jpegQuality', $transform)];
            case 'gif':
                return ['flatten' => false];
            case 'png':
                return ['png_compression_level' => $config->getSetting('pngCompressionLevel', $transform)];
            case 'webp':
                return ['webp_quality' => $config->getSetting('webpQuality', $transform), 'webp_imagick_options' => $config->getSetting('webpImagickOptions', $transform)];
        }

        return [];
    }
private function getSaveOptions($extension, $transform): array
    {
        /** @var ConfigModel $settings */
        $config = ImagerService::getConfig();

        switch (mb_strtolower($extension)) {
            case 'jpg':
            case 'jpeg':
                return ['jpeg_quality' => $config->getSetting('jpegQuality', $transform)];
            case 'gif':
                return ['flatten' => false];
            case 'png':
                return ['png_compression_level' => $config->getSetting('pngCompressionLevel', $transform)];
            case 'webp':
                return ['webp_quality' => $config->getSetting('webpQuality', $transform), 'webp_imagick_options' => $config->getSetting('webpImagickOptions', $transform)];
        }

        return [];
    }
private function getSaveOptions ( $ extension , $ transform ) : array { /** @var ConfigModel $settings */ $ config = ImagerService :: getConfig ( ) ; switch ( mb_strtolower ( $ extension ) ) { case 'jpg' : case 'jpeg' : return [ 'jpeg_quality' => $ config -> getSetting ( 'jpegQuality' , $ transform ) ] ; case 'gif' : return [ 'flatten' => false ] ; case 'png' : return [ 'png_compression_level' => $ config -> getSetting ( 'pngCompressionLevel' , $ transform ) ] ; case 'webp' : return [ 'webp_quality' => $ config -> getSetting ( 'webpQuality' , $ transform ) , 'webp_imagick_options' => $ config -> getSetting ( 'webpImagickOptions' , $ transform ) ] ; } return [ ] ; }
Get the save options based on extension and transform

@param string $extension
@param array  $transform

@return array
Get the save options based on extension and transform