Hi,
i know it is an old topic, but i have the "Fujifilm FinePix Real 3D W1" kamera with the "mpo" 3d files.
Now i am printing the following 3d Stereoskop <
https://www.thingiverse.com/thing:5446241> (with Bambulabs) and need the pictures for printing as jpg.
Here comes the actualized program for PB 6.20, grettings
Code: Select all
UseJPEGImageDecoder()
UseJPEGImageEncoder()
file$ = "mpotest.mpo"
If FileSize(file$) 
  
  ReadFile(0, file$)
  length=Lof(0)
  *pic = AllocateMemory(length)
  ReadData(0, *pic, length)
  CloseFile(0)
  *pos=*pic
  *end=*pic+length-3
  
  nextimage=0
  
  While *pos < *end
    If CompareMemory(*pos, ?test, 4)
      If CatchImage(nextimage, *pos-6)
        Debug "loaded image "+Str(nextimage)
        nextimage+1
      EndIf
    EndIf
    *pos+1
  Wend
  
  CreateImage(2, ImageWidth(0)*2, ImageHeight(0))
  StartDrawing(ImageOutput(2))
    DrawImage(ImageID(0), 0, 0 ) 
    DrawImage(ImageID(1), ImageWidth(0), 0 ) 
  StopDrawing()
  SaveImage(2, "mpotest.jpg", #PB_ImagePlugin_JPEG )
  ShowLibraryViewer("image", 0)
  CallDebugger
  
Else
  Debug "couldn't download the file"
EndIf
DataSection 
  test:
  Data.a $45,$78,$69,$66
EndDataSection