Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid uncomressed images when recording from Unreal editor #3214

Closed
alonfaraj opened this issue Dec 14, 2020 · 2 comments · Fixed by #2861
Closed

Invalid uncomressed images when recording from Unreal editor #3214

alonfaraj opened this issue Dec 14, 2020 · 2 comments · Fixed by #2861

Comments

@alonfaraj
Copy link
Contributor

Bug report

  • AirSim Version/#commit: 1.3.1
  • UE/Unity version: 4.25.4
  • autopilot version: N/A
  • OS Version: Win10

What's the issue you encountered?

Recording uncompressed images from Unreal editor using rec button, output invalid images which can't be open when set "Compress": false.
When record compress images - it works fine.

Capture

Settings

Example:

  "Recording": {
    "RecordOnMove": false,
    "RecordInterval": 1,
    "Cameras": [
        { "CameraName": "0", "ImageType": 0, "PixelsAsFloat": false, "Compress": false },
        { "CameraName": "0", "ImageType": 5, "PixelsAsFloat": false, "Compress": false }
    ]
  }

How can the issue be reproduced?

  1. Add uncompress camera to recording section in setting file
  2. Record from unreal editor using 'R'
  3. Check the images folder
@rajat2004
Copy link
Contributor

This is a known bug, mentioned here - #2861 (comment)
Copied from the above linked comment - UE is doing the conversion to PNG format, and then we're just writing it as a binary file. For uncompressed, writing array values as binary doesn't work. I can see 2 options, either go for an external library such as libpng which will do the conversion and all (format's complex, so doesn't seem to be possible to write it ourselves), or use a different format such as PPM which is simpler and can be written similar to how PFM file is being written currently.
I haven't worked on it more since then, maybe will pick it up again, I guess PPM will be better than nothing, external libraries are somewhat painful to inlcude, especially for cross-platform.

@alonfaraj
Copy link
Contributor Author

thank you @rajat2004

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants