An open API service indexing awesome lists of open source software.

https://github.com/odrevet/multi-picture-object

Generate a 3D picture (Multi Picture Object) from two jpeg
https://github.com/odrevet/multi-picture-object

3d-images 3ds mpo multi-picture

Last synced: about 1 year ago
JSON representation

Generate a 3D picture (Multi Picture Object) from two jpeg

Awesome Lists containing this project

README

          

generate a Multiple Picture Object files (.MPO) 3D picture from two jpeg files.

This software implement in PHP the CIPA's MPO official reference document
available at the following URL: http://www.cipa.jp/std/documents/download_e.html?DC-007_E

Nintendo 3DS Users can see the generated test 3D file here
on github by clicking the out.MPO file then "View Raw".

# Code comment and annotations

The code is documented and annoted with the chapter and paragraph references to the CIPA manual.

The adresses where the data will be written in the file created with the sample left.jpg and right.jpg are annoted in the comments.
(e.g @0x42). Theses values may be differant with another input files.

# Usage

## Command line

This PHP script can be used with a Command Line Interface by calling cli.php with the php binary :

* Command line arguments:


-l FILENAME : left jpg file (mandatory argument)
-r FILENAME : right jpg file (mandatory argument)
-o FILENAME : output MPO file name to produce (defaults to out.mpo)

* example :

```
php cli.php -l left.jpg -r right.jpg -o out.MPO
```

## Web server
It also can be used with a web server like this:

Assuming the requets has a file_left and a file_right parameters from an HTML form with two file inputs.

```PHP
getMessage());
}
?>
```

## Docker

https://hub.docker.com/_/php

```
docker build -t mpo-cli .
docker run -v $(pwd):/usr/src/MPO --rm mpo-cli
```

# Testing

I used an hexadecimal editor (EMACS hexl-mode) to check the generated file if the data where correct

# 3DS limitations

The 3DS can not read 3D pictures with a width superior at 700px.