set_include_path(get_include_path() . PATH_SEPARATOR . $basepath . "/modules/bolts/lib"); set_include_path(get_include_path() . PATH_SEPARATOR . $config['application']['asido_path']); define('ASIDO_DIR', null); @(include 'class.asido.php'); @asido::driver('gd_c'); $i1 = @asido::image($image, $resized); if ($crop) { @asido::Crop($i1, $crop_start_x, $crop_start_y, $crop_width, $crop_width); @asido::width($i1, $max_width); } else { if ($max_height > 0) { $use_height = $max_height; } else { $use_height = 1000; } @asido::fit($i1, $max_width, $use_height); } if ($format == "jpg") { @asido::convert($i1, 'image/jpeg'); } @$i1->save(ASIDO_OVERWRITE_ENABLED); } header("Content-Length: " . filesize($resized)); if ($format == "jpg") { header("Content-type: image/jpeg"); } else { header("Content-type: image/png"); } readfile($resized); } catch (Exception $e) { }
function Renderimage($tempname, $mode, $folder) { include_once 'core/asido/class.asido.php'; asido::driver('gd'); if ($mode > 0) { $i = asido::image($folder . $tempname, $folder . $tempname); asido::fit($i, $mode, $mode); $i->save(ASIDO_OVERWRITE_ENABLED); } }