return;
}
try {
-
- Integer size = CdmStore.getService(IMediaService.class).getImageSize(uri, 10000);
-
- if(size != null){
- text_size.setText(FileUtils.byteCountToDisplaySize(size));
- getEntity().setSize(size);
- }
-
-
+
try {
ImageInfo imageInfo = ImageInfo.NewInstanceWithMetaData(uri, 10000);
+ text_size.setText(FileUtils.byteCountToDisplaySize(imageInfo.getLength()));
+ // KLUDGE this is not save for very large files. I don't think we will handle such large files in the near future
+ getEntity().setSize((int) imageInfo.getLength());
+
text_height.setInteger(imageInfo.getHeight());
getEntity().setHeight(imageInfo.getHeight());