[jira] [Commented] (IMAGING-338) Sanselan returns an empty set when retrieving the image metadata

2022-11-14 Thread Nikhil (Jira)


[ 
https://issues.apache.org/jira/browse/IMAGING-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17634179#comment-17634179
 ] 

Nikhil commented on IMAGING-338:


Hi [~ggregory] 

I do not have the specific test code since we are tightly coupled code in our 
project and through debug we could find this -

 

The problem is in {*}IPTCParser.parseIPTCBlock{*}. with {*}TestImage.jpg{*}, we 
correctly determine it is a IPTC block with isIPTCBlock() but then fail to 
parse anything within parseIPTCBlock.

We enter into this code and return an empty ArrayList (elements):
if (tagMarker != IPTC_RECORD_TAG_MARKER)

{ if (verbose) System.out .println("Unexpected record tag marker in IPTC 
data."); return elements; }

 

But with a working image, we continue and parse all the IPTC tags.

> Sanselan returns an empty set when retrieving the image metadata
> 
>
> Key: IMAGING-338
> URL: https://issues.apache.org/jira/browse/IMAGING-338
> Project: Commons Imaging
>  Issue Type: Bug
>Affects Versions: 0.97
>Reporter: Nikhil
>Priority: Major
> Attachments: TestImage.jpg
>
>
> We were using Sanselan to extract IPTC metadata. Recently there were images 
> thats causing Sanselan to return an empty set when retrieving the metadata, 
> despite the fact that there is clearly iptc metadata in the image.
>  
> The problem is seen in the following codebase
> IPTCParser.parseIPTCBlock(...), and is the second 'if' statement within the
> while loop. In particular, instead of the following:
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   {*}return elements{*};
>  }
>  
> You should do the following to fix the issue:
>  
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   *continue;*
> }
>  
> Credit @ 
> [https://www.mail-archive.com/sanselan-dev@incubator.apache.org/msg00430.html]
>  for the detailed notes



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IMAGING-338) Sanselan returns an empty set when retrieving the image metadata

2022-11-10 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/IMAGING-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631606#comment-17631606
 ] 

Gary D. Gregory commented on IMAGING-338:
-

Do you have code for a failing test case?

> Sanselan returns an empty set when retrieving the image metadata
> 
>
> Key: IMAGING-338
> URL: https://issues.apache.org/jira/browse/IMAGING-338
> Project: Commons Imaging
>  Issue Type: Bug
>Affects Versions: 0.97
>Reporter: Nikhil
>Priority: Major
> Attachments: TestImage.jpg
>
>
> We were using Sanselan to extract IPTC metadata. Recently there were images 
> thats causing Sanselan to return an empty set when retrieving the metadata, 
> despite the fact that there is clearly iptc metadata in the image.
>  
> The problem is seen in the following codebase
> IPTCParser.parseIPTCBlock(...), and is the second 'if' statement within the
> while loop. In particular, instead of the following:
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   {*}return elements{*};
>  }
>  
> You should do the following to fix the issue:
>  
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   *continue;*
> }
>  
> Credit @ 
> [https://www.mail-archive.com/sanselan-dev@incubator.apache.org/msg00430.html]
>  for the detailed notes



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IMAGING-338) Sanselan returns an empty set when retrieving the image metadata

2022-11-10 Thread Nikhil (Jira)


[ 
https://issues.apache.org/jira/browse/IMAGING-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631603#comment-17631603
 ] 

Nikhil commented on IMAGING-338:


This code is same in the latest library as well and please find the image where 
we are able to replicate the issue ({*}TestImage.jpg{*})

> Sanselan returns an empty set when retrieving the image metadata
> 
>
> Key: IMAGING-338
> URL: https://issues.apache.org/jira/browse/IMAGING-338
> Project: Commons Imaging
>  Issue Type: Bug
>Affects Versions: 0.97
>Reporter: Nikhil
>Priority: Major
> Attachments: TestImage.jpg
>
>
> We were using Sanselan to extract IPTC metadata. Recently there were images 
> thats causing Sanselan to return an empty set when retrieving the metadata, 
> despite the fact that there is clearly iptc metadata in the image.
>  
> The problem is seen in the following codebase
> IPTCParser.parseIPTCBlock(...), and is the second 'if' statement within the
> while loop. In particular, instead of the following:
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   {*}return elements{*};
>  }
>  
> You should do the following to fix the issue:
>  
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   *continue;*
> }
>  
> Credit @ 
> [https://www.mail-archive.com/sanselan-dev@incubator.apache.org/msg00430.html]
>  for the detailed notes



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IMAGING-338) Sanselan returns an empty set when retrieving the image metadata

2022-11-09 Thread Gary D. Gregory (Jira)


[ 
https://issues.apache.org/jira/browse/IMAGING-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17630987#comment-17630987
 ] 

Gary D. Gregory commented on IMAGING-338:
-

Hi [~somasaninikhil] 

Thank you for your ticket. 

Did you check if the code is still like this in git master?

Do you have an image to reproduce this? 

The best way to move forward is to create a ticket on GitHub, this will allow 
the patch to get automatically tested in a build. 

 

 

> Sanselan returns an empty set when retrieving the image metadata
> 
>
> Key: IMAGING-338
> URL: https://issues.apache.org/jira/browse/IMAGING-338
> Project: Commons Imaging
>  Issue Type: Bug
>Affects Versions: 0.97
>Reporter: Nikhil
>Priority: Major
>
> We were using Sanselan to extract IPTC metadata. Recently there were images 
> thats causing Sanselan to return an empty set when retrieving the metadata, 
> despite the fact that there is clearly iptc metadata in the image.
>  
> The problem is seen in the following codebase
> IPTCParser.parseIPTCBlock(...), and is the second 'if' statement within the
> while loop. In particular, instead of the following:
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   {*}return elements{*};
>  }
>  
> You should do the following to fix the issue:
>  
> if (tagMarker != IPTC_RECORD_TAG_MARKER) {
>   if (verbose) {
>       System.out.println("Unexpected record tag marker in IPTC data.");
>   }
>   *continue;*
> }
>  
> Credit @ 
> [https://www.mail-archive.com/sanselan-dev@incubator.apache.org/msg00430.html]
>  for the detailed notes



--
This message was sent by Atlassian Jira
(v8.20.10#820010)