mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-15 15:02:20 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
104496: Merged 5.0.N (5.0.2) to HEAD-BUG-FIX (5.1/Cloud) 104336: Merged NESS/5.0.N-2015_03_23 (5.0.2) to 5.0.N (5.0.2) 103763: MNT-13920 - rewrite the image dimension properties if there is any exif dimensions information available 104332: MNT-13920 - code changes based on review, improved javadoc and slight modifications on the extract size method git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@104607 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -530,6 +530,30 @@ public abstract class TikaPoweredMetadataExtracter
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Exif metadata for size also returns the string "pixels"
|
||||
* after the number value , this function will
|
||||
* stop at the first non digit character found in the text
|
||||
* @param sizeText string text
|
||||
* @return the size value
|
||||
*/
|
||||
protected String extractSize(String sizeText)
|
||||
{
|
||||
StringBuilder sizeValue = new StringBuilder();
|
||||
for(char c : sizeText.toCharArray())
|
||||
{
|
||||
if(Character.isDigit(c))
|
||||
{
|
||||
sizeValue.append(c);
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
return sizeValue.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This content handler will capture entries from within
|
||||
* the header of the Tika content XHTML, but ignore the
|
||||
|
Reference in New Issue
Block a user