0

I need to show all panorama photo in Gallery android. But it extension is jpg same regular photo.

How can I check a photo in Gallery android is Panorama photo?

Thanks

jupiter
  • 143
  • 1
  • 11

2 Answers2

1

You'll need to extract the XMP Metadata

XMP Metadata is essentically image metadata...

...encoded in some XML-friendly format, such as Base64.

See this previous question/answers on StackOverflow to see how to decode Base64.

Based on the xml you can decode from the jpeg, you may be able to guess the intent-filter you'll need. In the case of a photo sphere panorama format for instance, this is the format.

If you want to accept Photo Sphere images in your own Android apps, you can add the custom MIME type application/vnd.google.panorama360+jpg to the relevant IntentFilter in your app.

However, I'm not sure what type of panorama your jpeg is in. It may help if you posted the particular jpeg with your question.

Community
  • 1
  • 1
Stephan Branczyk
  • 9,363
  • 2
  • 33
  • 49
1

Ask the mediadatabase through a filter condition

Where ((height/width > 2) or (width/height >= 2))

something like this

    ContentResolver resolver = context.getContentResolver();
    Cursor query = resolver.query(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, 
      sqlSelectColums, '((height/width > 2) or (width/height >= 2))', 
      null, sqlSortOrder);
k3b
  • 14,517
  • 7
  • 53
  • 85