/** * Generate cache key. * * @return */ default String getCacheKey() { StringBuilder builder = new StringBuilder(); if (getRect() != null) { builder.append("rect" + getRect().toString()); } if (getCropMode() != null) { builder.append("crop" + getCropMode()); } if (getWidth() != null) { builder.append("rw" + getWidth()); } if (getHeight() != null) { builder.append("rh" + getHeight()); } if (getFocalPoint() != null) { builder.append("fp" + getFocalPoint().toString()); } if (getFocalPointDebug()) { builder.append("fpdebug"); } if (getFocalPointZoom() != null) { builder.append("fpz" + getFocalPointZoom()); } return builder.toString(); }
FocalPoint focalPoint = parameters.getFocalPoint(); if (focalPoint == null) { return img; Point absFocalPoint = parameters.getFocalPoint().convertToAbsolutePoint(imageSize); if (!absFocalPoint.isWithinBoundsOf(imageSize)) { throw error(BAD_REQUEST, "image_error_focalpoint_out_of_bounds", focalPoint.toString(), imageSize.toString());