// people coming in from outside shouldn't have to wait for anything!
// if the url includes a cache identifier, use it
$neww = 0;
// worst case: we can't produce an image!
$newh = 0;
if (!empty($cachename)) {
    $zippath = IMGPATH . "/" . $cachename;
} elseif ($fromhere || !$defaultzip) {
    $zippath = generate_images($quality, $width_image, $height_image, $actwoa, $acthoa, $corner_radius, $color, $grcolor, $button_text, $text_height, $text_color, $back_color, $font_style, $rcolor, $rgrcolor, $rtext_color, $image_locate, $image_height, $image_name, $image_foreground, $image_foregroundcolor, $image_transparent, $image_transparentcolor, $fonts, $defaultzip);
    $neww = $actwoa;
    $newh = $acthoa;
} elseif (!$fromhere) {
    $zippath = IMGPATH . "/" . basename(DEFAULTZIP, ".zip");
    $dummy = "";
    // retrieve default image details from default.zip
    if (get_zip_data(basename($zippath), $dummy, $dummy, false, true, $dummy, $dummy, $data)) {
        $button_text = $data[TAGBT];
        $color = $data[TAGPC];
        $grcolor = $data[TAGGC];
        $width_image = $data[TAGW];
        $height_image = $data[TAGH];
        $corner_radius = $data[TAGCR];
        $text_height = $data[TAGTH];
        $text_color = $data[TAGTC];
        $back_color = $data[TAGBC];
        $font_name = $data[TAGFN];
        $rcolor = $data[TAGRPC];
        $rgrcolor = $data[TAGRGC];
        $rtext_color = $data[TAGRTC];
        $quality = $data[TAGQ];
        $image_locate = $data[TAGIL];
function get_zip_url($basename, &$url)
{
    $dummy = "";
    $ret = get_zip_data($basename, $dummy, "", false, true, $dummypng, $dummy, $data);
    @unlink($dummypng);
    $url = $data[TAGURL];
    return $ret;
}