/** * Calculates image width and height from the image resource. * * @throws ImageFileException * @return void */ public function refresh() { $this->calculateDimensionsFromResource($this->resource); parent::refresh(); }
/** * Refreshes this image variant: according to the added adjustments, a new image is rendered and stored as this * image variant's resource. * * @return void * @see getResource() */ public function refresh() { // Several refresh() calls might happen during one request. If that is the case, the Resource Manager can't know // that the first created resource object doesn't have to be persisted / published anymore. Thus we need to // delete the resource manually in order to avoid orphaned resource objects: if ($this->resource !== null) { $this->resourceManager->deleteResource($this->resource); } parent::refresh(); $this->renderResource(); }