/** * use the image id to get a url to a sized image * @param $id image id of image to be sized * @param $crop_style how to fill the rectangle containing the * image: fill or fit * @return the url to the sized image */ function get_image_url_and_alt($id, $crop_style = "fill") { $width = $this->width; $height = $this->height; $rsi = new reasonSizedImage(); $rsi->set_id($id); $rsi->set_width($width); $rsi->set_height($height); $rsi->set_crop_style($crop_style); $ret = $rsi->get_url_and_alt(); return $ret; }
/** * returns the url to the sized image * @param $id image id of image to be sized * @param $crop_style how to size the image in the new wxh, fill or fit * @return The url to the sized image */ function get_image_url_and_alt($id, $crop_style = "fill") { $width = $this->params['width']; $height = $this->params['height']; $rsi = new reasonSizedImage(); $rsi->set_id($id); $rsi->set_width($width); $rsi->set_height($height); $rsi->set_crop_style($crop_style); $rsi->use_absolute_urls($this->params['absolute_urls']); $ret = $rsi->get_url_and_alt(); return $ret; }