Panda3D

Loading...
Searching...
No Matches
Functions | Variables
config_pnmimagetypes.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

`#include "config_pnmimagetypes.h"`
`#include "pnmFileTypeSGI.h"`
`#include "pnmFileTypeTGA.h"`
`#include "pnmFileTypeIMG.h"`
`#include "pnmFileTypeSoftImage.h"`
`#include "pnmFileTypeBMP.h"`
`#include "pnmFileTypeJPG.h"`
`#include "pnmFileTypePNG.h"`
`#include "pnmFileTypePNM.h"`
`#include "pnmFileTypePfm.h"`
`#include "pnmFileTypeTIFF.h"`
`#include "pnmFileTypeEXR.h"`
`#include "pnmFileTypeStbImage.h"`
`#include "sgi.h"`
`#include "config_pnmimage.h"`
`#include "pnmFileTypeRegistry.h"`
`#include "string_utils.h"`
`#include "dconfig.h"`
`#include "pandaSystem.h"`

Go to the source code of this file.

## Functions
| Configure (config_pnmimagetypes)
| ConfigureFn (config_pnmimagetypes)
void | init_libpnmimagetypes ()
| Initializes the library.
| NotifyCategoryDefName (pnmimage_bmp, "bmp", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_exr, "exr", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_img, "img", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_jpg, "jpg", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_png, "png", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_pnm, "pnm", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_sgi, "sgi", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_soft, "soft", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_tga, "tga", pnmimage_cat)
| NotifyCategoryDefName (pnmimage_tiff, "tiff", pnmimage_cat)
ostream & | operator<< (ostream &out, IMGHeaderType iht)
ostream & | operator<< (ostream &out, SGIStorageType sst)
istream & | operator>> (istream &in, IMGHeaderType &iht)
istream & | operator>> (istream &in, SGIStorageType &sst)

## Variables
ConfigVariableInt | bmp_bpp ("bmp-bpp", 0, PRC_DESC("This controls how many bits per pixel are written out for BMP " "files. If this is zero, the default, the number of bits per pixel " "is based on the image."))
ConfigVariableEnum< IMGHeaderType > | img_header_type ("img-header-type", IHT_short, PRC_DESC("IMG format is just a sequential string of r, g, b bytes. However, " "it may or may not include a \"header\" which consists of the xsize " "and the ysize of the image, either as shorts or as longs. Specify " "that with this variable, either 'short', 'long', or 'none' for " "no header at all (in which case you should also set img-size)."))
ConfigVariableInt | img_size ("img-size", 0, PRC_DESC("If an IMG file without a header is loaded (e.g. img-header-type " "is set to 'none', this specifies the fixed x y size of the image."))
ConfigVariableInt | jpeg_quality ("jpeg-quality", 95, PRC_DESC("Set this to the quality percentage for writing JPEG files. 95 is " "the highest useful value (values greater than 95 do not lead to " "significantly better quality, but do lead to significantly greater " "size)."))
ConfigVariableInt | png_compression_level ("png-compression-level", 6, PRC_DESC("Set this to the desired compression level for writing PNG images. " "Valid values are 0 (no compression), or 1 (compression, best " "speed) to 9 (best compression). Default is 6. PNG compression is " "lossless."))
ConfigVariableBool | png_palette ("png-palette", true, PRC_DESC("Set this true to allow writing palette-based PNG images when " "possible."))
ConfigVariableString | sgi_imagename ("sgi-imagename", "", PRC_DESC("This string is written to the header of an SGI (*.rgb) file. " "It seems to have documentation purposes only."))
ConfigVariableEnum< SGIStorageType > | sgi_storage_type ("sgi-storage-type", SST_rle, PRC_DESC("Use either 'rle' or 'verbatim' to indicate how SGI (*.rgb) " "files are written."))
ConfigVariableBool | tga_colormap ("tga-colormap", false, PRC_DESC("Set this true to write colormapped TGA files."))
ConfigVariableBool | tga_grayscale ("tga-grayscale", false, PRC_DESC("Set this true to enable writing grayscale TGA files."))
ConfigVariableBool | tga_rle ("tga-rle", false, PRC_DESC("Set this true to enable RLE compression when writing TGA files."))

## Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
  drose

Date
  2000-06-17

Definition in file config_pnmimagetypes.cxx.

## Function Documentation

## ◆ ConfigureFn()

ConfigureFn | ( | config_pnmimagetypes |  | ) |

Definition at line 182 of file config_pnmimagetypes.cxx.

## ◆ init_libpnmimagetypes()

void init_libpnmimagetypes | ( |  | ) |

Initializes the library.

This must be called at least once before any of the functions or classes in this library can be used. Normally it will be called by the static initializers and need not be called explicitly, but special cases exist.

Definition at line 193 of file config_pnmimagetypes.cxx.

References PandaSystem::add_system(), PandaSystem::get_global_ptr(), PNMFileTypeRegistry::get_global_ptr(), init_libpnmimage(), PNMFileTypeRegistry::register_type(), and PNMFileTypePfm::register_with_read_factory().

Referenced by init_libpanda(), and PandaFramework::open_framework().

## ◆ operator<<() [1/2]

ostream & operator<< | ( | ostream & | out,
|  | IMGHeaderType | iht )

Definition at line 148 of file config_pnmimagetypes.cxx.

## ◆ operator<<() [2/2]

ostream & operator<< | ( | ostream & | out,
|  | SGIStorageType | sst )

Definition at line 118 of file config_pnmimagetypes.cxx.

## ◆ operator>>() [1/2]

istream & operator>> | ( | istream & | in,
|  | IMGHeaderType & | iht )

Definition at line 163 of file config_pnmimagetypes.cxx.

## ◆ operator>>() [2/2]

istream & operator>> | ( | istream & | in,
|  | SGIStorageType & | sst )

Definition at line 131 of file config_pnmimagetypes.cxx.