You are viewing a plain text version of this content. The canonical link for it is here.
Posted to sanselan-dev@incubator.apache.org by "Kelly Boettcher (JIRA)" <ji...@apache.org> on 2009/02/24 05:26:01 UTC

[jira] Created: (SANSELAN-18) Sanselan 0.97 - GIF Parser facilities return null values for xmp

Sanselan 0.97 - GIF Parser facilities return null values for xmp
----------------------------------------------------------------

                 Key: SANSELAN-18
                 URL: https://issues.apache.org/jira/browse/SANSELAN-18
             Project: Sanselan
          Issue Type: Bug
         Environment: Windows XP, JDK 1.5
            Reporter: Kelly Boettcher


When attempting to use both core Sanselan methods and GIFParser methods, attempts to retrieve XMP is resulting in null values. Example code below:

File file;
InputStream is;
byte[] b;

file = new File("C:/data/test.gif");
is = new FileInputStream(file);
b = new byte[is.available()];
is.read(b);
is.close();
		    
/* Testing the Sanselan getXMP */		    
String xmp = Sanselan.getXmpXml(file); // returns null
System.out.println(xmp);
		    
/* Testing the GIF image parser's xmp capabilities */
GifImageParser parser = new GifImageParser();
ByteSource bs = new ByteSourceArray(b);
String existingXMP = parser.getXmpXml(bs, null); // returns null
System.out.println(existingXMP);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SANSELAN-18) Sanselan 0.97 - GIF Parser facilities return null values for xmp

Posted by "Kelly Boettcher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANSELAN-18?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelly Boettcher updated SANSELAN-18:
------------------------------------

    Attachment: TestGIF.gif

> Sanselan 0.97 - GIF Parser facilities return null values for xmp
> ----------------------------------------------------------------
>
>                 Key: SANSELAN-18
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-18
>             Project: Sanselan
>          Issue Type: Bug
>         Environment: Windows XP, JDK 1.5
>            Reporter: Kelly Boettcher
>         Attachments: TestGIF.gif
>
>
> When attempting to use both core Sanselan methods and GIFParser methods, attempts to retrieve XMP is resulting in null values. Example code below:
> File file;
> InputStream is;
> byte[] b;
> file = new File("C:/data/test.gif");
> is = new FileInputStream(file);
> b = new byte[is.available()];
> is.read(b);
> is.close();
> 		    
> /* Testing the Sanselan getXMP */		    
> String xmp = Sanselan.getXmpXml(file); // returns null
> System.out.println(xmp);
> 		    
> /* Testing the GIF image parser's xmp capabilities */
> GifImageParser parser = new GifImageParser();
> ByteSource bs = new ByteSourceArray(b);
> String existingXMP = parser.getXmpXml(bs, null); // returns null
> System.out.println(existingXMP);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SANSELAN-18) Sanselan 0.97 - GIF Parser facilities return null values for xmp

Posted by "Kelly Boettcher (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANSELAN-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677855#action_12677855 ] 

Kelly Boettcher commented on SANSELAN-18:
-----------------------------------------

But doesn't the fact that I can see metadata within Adobe Photoshop mean that I should be returning some sort of xmp values? Perhaps not. Ok, can you point me in the direction of xmp write back facilities for GIF format?

> Sanselan 0.97 - GIF Parser facilities return null values for xmp
> ----------------------------------------------------------------
>
>                 Key: SANSELAN-18
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-18
>             Project: Sanselan
>          Issue Type: Bug
>         Environment: Windows XP, JDK 1.5
>            Reporter: Kelly Boettcher
>         Attachments: TestGIF.gif
>
>
> When attempting to use both core Sanselan methods and GIFParser methods, attempts to retrieve XMP is resulting in null values. Example code below:
> File file;
> InputStream is;
> byte[] b;
> file = new File("C:/data/TestGIF.gif");
> is = new FileInputStream(file);
> b = new byte[is.available()];
> is.read(b);
> is.close();
> 		    
> /* Testing the Sanselan getXMP */		    
> String xmp = Sanselan.getXmpXml(file); // returns null
> System.out.println(xmp);
> 		    
> /* Testing the GIF image parser's xmp capabilities */
> GifImageParser parser = new GifImageParser();
> ByteSource bs = new ByteSourceArray(b);
> String existingXMP = parser.getXmpXml(bs, null); // returns null
> System.out.println(existingXMP);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (SANSELAN-18) Sanselan 0.97 - GIF Parser facilities return null values for xmp

Posted by "Charles Matthew Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SANSELAN-18?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677824#action_12677824 ] 

Charles Matthew Chen commented on SANSELAN-18:
----------------------------------------------

getXmpXml() returns null if no XMP data is found in the image file.

Also, you might be seeing an issue due to the way you're reading your file.  is.read() isn't guaranteed to read the entire stream - you'll need to loop read()s.  You're also not buffering the stream, which makes a significant performance difference.  Sanselan's ByteSources deal with these issues; I suggest the much easier:

File file = new File("C:/data/TestGIF.gif"); 
String xmp = Sanselan.getXmpXml(file);
if(null != xmp) {
   System.out.println(existingXMP);
} else {
   System.out.println("Image contains no xmp data.");
}

> Sanselan 0.97 - GIF Parser facilities return null values for xmp
> ----------------------------------------------------------------
>
>                 Key: SANSELAN-18
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-18
>             Project: Sanselan
>          Issue Type: Bug
>         Environment: Windows XP, JDK 1.5
>            Reporter: Kelly Boettcher
>         Attachments: TestGIF.gif
>
>
> When attempting to use both core Sanselan methods and GIFParser methods, attempts to retrieve XMP is resulting in null values. Example code below:
> File file;
> InputStream is;
> byte[] b;
> file = new File("C:/data/TestGIF.gif");
> is = new FileInputStream(file);
> b = new byte[is.available()];
> is.read(b);
> is.close();
> 		    
> /* Testing the Sanselan getXMP */		    
> String xmp = Sanselan.getXmpXml(file); // returns null
> System.out.println(xmp);
> 		    
> /* Testing the GIF image parser's xmp capabilities */
> GifImageParser parser = new GifImageParser();
> ByteSource bs = new ByteSourceArray(b);
> String existingXMP = parser.getXmpXml(bs, null); // returns null
> System.out.println(existingXMP);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SANSELAN-18) Sanselan 0.97 - GIF Parser facilities return null values for xmp

Posted by "Kelly Boettcher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SANSELAN-18?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelly Boettcher updated SANSELAN-18:
------------------------------------

    Description: 
When attempting to use both core Sanselan methods and GIFParser methods, attempts to retrieve XMP is resulting in null values. Example code below:

File file;
InputStream is;
byte[] b;

file = new File("C:/data/TestGIF.gif");
is = new FileInputStream(file);
b = new byte[is.available()];
is.read(b);
is.close();
		    
/* Testing the Sanselan getXMP */		    
String xmp = Sanselan.getXmpXml(file); // returns null
System.out.println(xmp);
		    
/* Testing the GIF image parser's xmp capabilities */
GifImageParser parser = new GifImageParser();
ByteSource bs = new ByteSourceArray(b);
String existingXMP = parser.getXmpXml(bs, null); // returns null
System.out.println(existingXMP);

  was:
When attempting to use both core Sanselan methods and GIFParser methods, attempts to retrieve XMP is resulting in null values. Example code below:

File file;
InputStream is;
byte[] b;

file = new File("C:/data/test.gif");
is = new FileInputStream(file);
b = new byte[is.available()];
is.read(b);
is.close();
		    
/* Testing the Sanselan getXMP */		    
String xmp = Sanselan.getXmpXml(file); // returns null
System.out.println(xmp);
		    
/* Testing the GIF image parser's xmp capabilities */
GifImageParser parser = new GifImageParser();
ByteSource bs = new ByteSourceArray(b);
String existingXMP = parser.getXmpXml(bs, null); // returns null
System.out.println(existingXMP);


> Sanselan 0.97 - GIF Parser facilities return null values for xmp
> ----------------------------------------------------------------
>
>                 Key: SANSELAN-18
>                 URL: https://issues.apache.org/jira/browse/SANSELAN-18
>             Project: Sanselan
>          Issue Type: Bug
>         Environment: Windows XP, JDK 1.5
>            Reporter: Kelly Boettcher
>         Attachments: TestGIF.gif
>
>
> When attempting to use both core Sanselan methods and GIFParser methods, attempts to retrieve XMP is resulting in null values. Example code below:
> File file;
> InputStream is;
> byte[] b;
> file = new File("C:/data/TestGIF.gif");
> is = new FileInputStream(file);
> b = new byte[is.available()];
> is.read(b);
> is.close();
> 		    
> /* Testing the Sanselan getXMP */		    
> String xmp = Sanselan.getXmpXml(file); // returns null
> System.out.println(xmp);
> 		    
> /* Testing the GIF image parser's xmp capabilities */
> GifImageParser parser = new GifImageParser();
> ByteSource bs = new ByteSourceArray(b);
> String existingXMP = parser.getXmpXml(bs, null); // returns null
> System.out.println(existingXMP);

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.