public static function resize_mk_img($root_path, $root_url, $output_path, $max_x, $max_y, $picture, $alternate = NULL, $overwrite = FALSE, $extra_attrs = "", $resize_type = RESIZE_CROP)
 {
     $info = ImageResize::resize_img($root_path, $root_url, $output_path, $max_x, $max_y, $picture, $alternate, $overwrite, $resize_type);
     if (!$picture instanceof StoredFile) {
         if (!file_exists($info['final_path'])) {
             $info = NULL;
             // For Animated Gif files Only
             ImageResize::create_frame_from_animated_pic($root_path, $picture, $output_path, $max_x, $max_y);
             $info = ImageResize::resize_img($root_path, $root_url, $output_path, $max_x, $max_y, $picture, $alternate, $overwrite, $resize_type);
         }
         $info['url'] = "{$root_url}/" . $info['final_path'];
     }
     if ($extra_attrs) {
         $img = "<img {$extra_attrs}";
     } else {
         $img = "<img";
     }
     return $img . ' border="0" src="' . htmlspecialchars($info['url']) . '" ' . $info['size_attr'] . '/>';
 }