Exemplo n.º 1
0
 private KeyValue<String, String> createPicasaDescriptor(Image image, ImageOptions options) {
   KeyValue<String, String> uniqueIdentifier = new DefaultKeyValue<String, String>();
   uniqueIdentifier.setKey(
       GoogleImagePathUtil.getGoogleResizedPath(
           image.getPath(), options.getImageSize().getWidth()));
   uniqueIdentifier.setValue(uniqueIdentifier.getKey());
   return uniqueIdentifier;
 }
Exemplo n.º 2
0
 @Override
 protected KeyValue<String, String> storeFile(Image image, ImageOptions options)
     throws IOException {
   if (GoogleImagePathUtil.isPicasaImage(image.getPath())) {
     return createPicasaDescriptor(image, options);
   }
   InputStreamContainer resizedInputStreamContainer = resize(options);
   return getFileStorageService()
       .storeFile(image, resizedInputStreamContainer, options.getAdditionalProperties());
 }