/** * If there is no image this is giving us a mess of an image with a huge icon. */ function get_av_img_url($image) { $width = $this->width; $height = $this->height; $crop_style = $this->crop_style; $id = $image->get_value('id'); $rsi = new reasonSizedImage(); $rsi->set_id($id); $rsi->set_width($width); $rsi->set_height($height); $rsi->set_crop_style($crop_style); $watermark = $this->get_watermark_absolute_path($this->media_works_type); $options = array(); $options['horizontal'] = "center"; $options['vertical'] = "center"; $rsi->set_blit($watermark, $options); $rsi->use_absolute_urls($this->use_absolute_urls); $url = $rsi->get_url(); return $url; }
/** * 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; }