PNMFileTypeRegistry
from panda3d.core import PNMFileTypeRegistry
- class PNMFileTypeRegistry
Bases:
This class maintains the set of all known
PNMFileTypesin the universe.Inheritance diagram
- __init__(param0: PNMFileTypeRegistry)
- static getGlobalPtr() PNMFileTypeRegistry
Returns a pointer to the global
PNMFileTypeRegistryobject.
- getType(n: int) PNMFileType
Returns the nth type registered.
- getTypeByHandle(handle: TypeHandle) PNMFileType
Returns the
PNMFileTypeinstance stored in the registry for the givenTypeHandle, e.g. as retrieved by a previous call togetType()on the type instance.
- getTypeFromExtension(filename: str) PNMFileType
Tries to determine what the
PNMFileTypeis likely to be for a particular image file based on its extension. Returns a suitablePNMFileTypepointer, or NULL if no type can be determined.
- getTypeFromMagicNumber(magic_number: str) PNMFileType
Tries to determine what the
PNMFileTypeis likely to be for a particular image file based on its magic number, the first two bytes read from the file. Returns a suitablePNMFileTypepointer, or NULL if no type can be determined.
- property types Sequence[PNMFileType]
Returns the nth type registered.
