code: protected void init(CmsObject cms, CmsResource imageRes, String scaleParams) {
  
          setCmsObject(cms);
  
          // set VFS URI without scaling parameters
          setResource(cms, imageRes);
          setVfsUri(cms.getRequestContext().getSitePath(imageRes));
  
          // the originalScaler reads the image dimensions from the VFS properties
          CmsImageScaler originalScaler = new CmsImageScaler(cms, getResource());
          // set original scaler
          setOriginalScaler(originalScaler);
  
          // set base scaler
          CmsImageScaler baseScaler = originalScaler;
          if (scaleParams != null) {
              // scale parameters have been set
              baseScaler = new CmsImageScaler(scaleParams);
              baseScaler.setFocalPoint(originalScaler.getFocalPoint());
          }
  
          setBaseScaler(baseScaler);
  
          // set the current scaler to the base scaler
          setScaler(baseScaler);
      }
docs: Initializes this new image bean based on a VFS resource and optional scaler parameters.<p>
  
  @param cms the current OpenCms user context
  @param imageRes the VFS resource to read the image from
  @param scaleParams optional scaler parameters to apply to the VFS resource