Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.io.image bob.io.image
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 2
    • Issues 2
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bobbob
  • bob.io.imagebob.io.image
  • Issues
  • #18
Closed
Open
Issue created Sep 08, 2016 by Manuel Günther@mguentherMaintainer

Load images based on magic numbers instead of filename extension in C++

Currently, image loading in C++ relies only on the image extension and it is not possible to use the C++ interface to load images based on their magic numbers. While for python, this functionality was added by 28d836f2, there is still no way to do that in C++.

I could see a function called std::string bob::io::image::get_correct_image_extension(const std::string& image_name) that returns the correct image extension (if possible) for a given image. It could use some implementation like this: http://stackoverflow.com/a/26350431 to determine the correct image type and return a corresponding extension.

Unfortunately, this would also need a (minor) modification of the C++ interface introduced by de4443bf that allows to optionally specify a different filename extension. Finally, we could replace the function introduced in 28d836f2 by the according C++ implementation.

Assignee
Assign to
Time tracking