0

I'm attempting to add the XMP data required for submission to Google Views for a panoramic image processor, however my images aren't being accepted by Google as Photospheres. The XMP data is exactly the same in my JPEG as one generated by the Google converter.

The only difference I can see in the EXIF Tags is GPSAltitudeRef : Above Sea Level which is present in the version generated by the Google converter, but not in the version I'm doing.

I've tried adding that, but it seems there is a bug in the library I'm using: https://code.google.com/p/sanselanandroid/issues/detail?id=4 (I'm getting the same error)

              TiffOutputField altitudeRefField = TiffOutputField.create(TiffConstants.GPS_TAG_GPS_ALTITUDE_REF, outputSet.byteOrder, GPSTagConstants.GPS_TAG_GPS_ALTITUDE_REF_VALUE_ABOVE_SEA_LEVEL);

              TiffOutputDirectory exifDir = outputSet.findDirectory(TiffDirectoryConstants.DIRECTORY_TYPE_EXIF);

              exifDir.add( altitudeRefField );

Gives me the same error:

Tag does not expect a single value.[Ljava.lang.StackTraceElement;@55f923bd

Thanks

beek
  • 3,522
  • 8
  • 33
  • 86

1 Answers1

0

GPSAltitudeRef is not the problem. Somethign else is.

I got this data in with

 TagInfo tag  = new TagInfo(
                            "GPSAltitudeRef",
                            0x0005,
                            TiffConstants.FIELD_TYPE_DESCRIPTION_BYTE,
                            1,
                            TiffConstants.EXIF_DIRECTORY_GPS);

                  Byte b = new Byte( (byte) TiffConstants.GPS_TAG_GPS_ALTITUDE_REF_VALUE_ABOVE_SEA_LEVEL );

                  TiffOutputField altitude = TiffOutputField.create(tag, outputSet.byteOrder, b);
                    TiffOutputDirectory exifDirectory = outputSet.getOrCreateExifDirectory();

                    exifDirectory.add( altitude );
beek
  • 3,522
  • 8
  • 33
  • 86