if ($download_ok === TRUE) { // WEB PREVIEWS $debug->add("Formatting {$targetDir}/" . $g->filename . ".gif"); foreach ($game_dimensions_web_preview as $dimm => $dactive) { if ($dactive == "1") { // FORMATOS - GIF,JPEG,PNG,BMP $debug->add("Formatting {$targetDir}/" . $g->filename . ".gif"); foreach ($game_webpreview_formats as $format => $factive) { if ($factive == "1") { list($width, $height) = explode("x", $dimm); $debug->add("Creating {$format} {$width}" . "x{$height}"); if (copy_format_img($g->filename, $width, $height, "", ".gif", ".{$format}", "#FFFFFF") === FALSE) { $debug->add("ERROR creating {$format} {$width}" . "x{$height}"); } else { $debug->add("Success!!!"); $g->add("webpreview", "<file_{$dimm}>" . $g->filename . "_{$dimm}.{$format}</file_{$dimm}>\n"); } } else { $debug->add("Skipping processing {$format}, {$dimm}"); } } } else { $debug->add("Skipping {$dimm}."); } } // WAP PREVIEWS $debug->add("Formatting {$targetDir}/" . $g->filename . ".gif"); foreach ($game_dimensions_wap_preview as $dimm => $dactive) { if ($dactive == "1") { // FORMATOS - GIF,JPEG,PNG,BMP $debug->add("Formatting {$targetDir}/" . $g->filename . ".gif");