Bio-Formats is written in Java, and is easiest to use with other Java code. However, it is possible to call Bio-Formats from a program written in another language. But how to do so depends on your program’s needs.
Technologically, there are two broad categories of solutions: in-process approaches, and inter-process communication.
For details, see LOCI’s article Interfacing from non-Java code.
Example in-process solution: Bio-Formats JACE C++ bindings (note that this is a legacy project and no longer actively maintained).