mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +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:
@@ -250,6 +250,20 @@ public void testImageVideo() throws Throwable {
|
||||
assertEquals("92", p.get("height"));
|
||||
assertEquals("8 8 8", p.get("Data BitsPerSample"));
|
||||
|
||||
// Image with wrong tiff:Width property. see MNT-13920
|
||||
p = openAndCheck("SizeSample.jpg", "image/jpeg");
|
||||
// Check raw EXIF properties
|
||||
assertEquals("1535 pixels", p.get("Image Width"));
|
||||
assertEquals("367 pixels", p.get("Image Height"));
|
||||
|
||||
// Map and check
|
||||
Map<QName, Serializable> propsJPG = new HashMap<QName, Serializable>();
|
||||
ContentReader readerJPG = new FileContentReader(open("SizeSample.jpg"));
|
||||
readerJPG.setMimetype("image/jpeg");
|
||||
extracter.extract(readerJPG, propsJPG);
|
||||
assertEquals(1535, propsJPG.get(QName.createQName(NamespaceService.EXIF_MODEL_1_0_URI, "pixelXDimension")));
|
||||
assertEquals(367, propsJPG.get(QName.createQName(NamespaceService.EXIF_MODEL_1_0_URI, "pixelYDimension")));
|
||||
|
||||
|
||||
// Geo tagged image
|
||||
p = openAndCheck("GEO.jpg", "image/jpeg");
|
||||
|
Reference in New Issue
Block a user