Convert 2 images to MPO?

Started by Sycamorph, August 30, 2017, 06:00:19 AM

Previous topic - Next topic

Sycamorph

For some reason everyone on the Internet wants to extract JPG files from MPO, but that's the opposite of what I need. I know a tool that can create MPO files from 2 images (StereoPhoto Maker), but I need an automated way to do this, since I'm too lazy to manually convert everything. I hope this is possible to do. Thanks.

I need to create images that people can look at on 3D screens. I understand that most 3D screens don't necessarily need MPO files, but it would still be nice to have them if possible.

P.S. This line of code successfully creates an MPO file with just 1 image (I assumed that the first image in MPO files is the left image), but nothing I tried puts the second one in the created file.
exiftool left.jpg -o MPO.mpo

StarGeek

Going over old forum posts, I can find this post from 2010 where Phil says that exiftool can't join two images into a single MPO image.  I can't find any post indicating this has changed.  The last time MPO files are mentioned in the version history is 2009.

I did find this php script that will supposedly combine images to create an MPO image.
"It didn't work" isn't helpful. What was the exact command used and the output.
Read FAQ #3 and use that cmd
Please use the Code button for exiftool output

Please include your OS/Exiftool version/filetype

Sycamorph

#2
Quote from: StarGeek on August 30, 2017, 01:13:08 PM
Going over old forum posts, I can find this post from 2010 where Phil says that exiftool can't join two images into a single MPO image.  I can't find any post indicating this has changed.  The last time MPO files are mentioned in the version history is 2009.

I did find this php script that will supposedly combine images to create an MPO image.
Thank you! It works!

P.S. In case anyone wants to convert something for 3DS, this is what I did.
mogrify -format jpg -flatten -quality 100 left.png
mogrify -format jpg -flatten -quality 100 right.png
magick convert left.jpg -resize 640x480 -quality 95 3dsleft.jpg
magick convert right.jpg -resize 640x480 -quality 95 3dsright.jpg
C:\php\php cli.php -l left.jpg -r right.jpg -o MPO.mpo
C:\php\php cli.php -l 3dsleft.jpg -r 3dsright.jpg -o SYC_9999.mpo


I set quality to 95 because the resulting files are too large for 3DS to see with quality 100, and no one will notice artifacts anyway.
You'll only need ImageMagick and the php script from above to make it work.
It preserves the aspect ratio when resizing the image, so don't worry about that.
And yes, you have to use JPG to make MPO files, this is why there's that conversion from PNG at the start.

SYC_9999.mpo is for 3DS, MPO.mpo is for other 3D screens.