MPO: Difference between revisions

Elisherer (talk | contribs)
No edit summary
m fixed broken link
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:File formats]]
=== Overview ===
=== Overview ===


MPO = Multi-Picture Object
MPO = Multi-Picture Object
Document describing the file format used in mpo files:
http://www.cipa.jp/std/documents/e/DC-007_E.pdf


Nintendo uses a common format for its 3D pictures.
Nintendo uses a common format for its 3D pictures.
Line 8: Line 12:


EXIF is a standard that specifies the formats for images, sound, and ancillary tags used by digital cameras (including smartphones), scanners and other systems handling image and sound files recorded by digital cameras.[http://en.wikipedia.org/wiki/Exchangeable_image_file_format]
EXIF is a standard that specifies the formats for images, sound, and ancillary tags used by digital cameras (including smartphones), scanners and other systems handling image and sound files recorded by digital cameras.[http://en.wikipedia.org/wiki/Exchangeable_image_file_format]


=== Nintendo's EXIF Data Structure ===
=== Nintendo's EXIF Data Structure ===
Line 41: Line 44:
|0x0131
|0x0131
|Software
|Software
|00204  
|Depends on the software: 00204 for the Camera (EU), 00227 for the Mii Editor (EU), 00955 for KH3D (EU)
|-
|-
|0x0132
|0x0132
Line 168: Line 171:
|-
|-
|0x1100
|0x1100
|Unknown
|Software-specific data
|7-Undefined
|7-Undefined
|Count
|Count
Line 185: Line 188:


'''Nintendo's 64Byte Note'''
'''Nintendo's 64Byte Note'''
Different from the wrapping structure this structure is Little-Endian.


{| class="wikitable" border="1"
{| class="wikitable" border="1"
Line 193: Line 198:
!  Default Value
!  Default Value
|-
|-
|0
|0x00
|Magic
|Magic
|Byte[4]
|char[4]
|{'3','D','S','1'}
|{'3','D','S','1'}
|-
|-
|38
|0x04
|Unknown
|?
|Unknown
|uint32
|Unknown
|1 / 2 / 4 / 5
|-
|-
|40
|0x08
|3D Parallax*
|Timestamp
|NegInt?
|uint32
|?
|Number of seconds since 1/1/2000 00:00:00
|-
|0x0C
|Padding
|uint32
|0
|-
|0x10
|Title ID Low
|uint32
|like the title id low but without the last two letters
|-
|0x14
|Flags
|uint32
|
|-
|0x18
|Console ID
|byte[4]
|unique identifier
|-
|0x1C
|Padding
|byte[12]
|0
|-
|0x28
|3D Parallax
|float
|[-52,54]
|-
|0x2C
|Padding
|uint32
|0
|-
|0x30
|Category
|uint16
|0x2000 for a man, 0x4000 a woman, 0x1000 a mii...
|-
|0x32
|Filter
|uint16
|
|-
|0x34
|Padding
|byte[12]
|0
|}
|}
*The 3D Parallax value is the distance that the right image needed to move in order to get focus.
My formula to get that value isn't so good but here it is:
x = (lsb - 0xC0) << 8 + msb;
Parallax =  - round( 2 ^ (x/128 + 2) )
If someone makes sense of this, please explain or maybe correct..