mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-05 11:28:17 -04:00
print warning when file not found
This commit is contained in:
parent
9ef8e468e5
commit
79f9e04e26
@ -27,19 +27,6 @@ PNMImage() {
|
|||||||
_alpha = NULL;
|
_alpha = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
// Function: PNMImage::Constructor
|
|
||||||
// Access: Published
|
|
||||||
// Description:
|
|
||||||
////////////////////////////////////////////////////////////////////
|
|
||||||
INLINE PNMImage::
|
|
||||||
PNMImage(const Filename &filename, PNMFileType *type) {
|
|
||||||
_array = NULL;
|
|
||||||
_alpha = NULL;
|
|
||||||
|
|
||||||
read(filename, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: PNMImage::Constructor
|
// Function: PNMImage::Constructor
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -21,6 +21,23 @@
|
|||||||
#include "pnmWriter.h"
|
#include "pnmWriter.h"
|
||||||
#include "config_pnmimage.h"
|
#include "config_pnmimage.h"
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Function: PNMImage::Constructor
|
||||||
|
// Access: Published
|
||||||
|
// Description:
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
PNMImage::
|
||||||
|
PNMImage(const Filename &filename, PNMFileType *type) {
|
||||||
|
_array = NULL;
|
||||||
|
_alpha = NULL;
|
||||||
|
|
||||||
|
bool result = read(filename, type);
|
||||||
|
if (!result) {
|
||||||
|
pnmimage_cat.error()
|
||||||
|
<< "Could not read image " << filename << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: PNMImage::clear
|
// Function: PNMImage::clear
|
||||||
// Access: Published
|
// Access: Published
|
||||||
|
@ -59,7 +59,7 @@ class PNMFileType;
|
|||||||
class EXPCL_PANDA PNMImage : public PNMImageHeader {
|
class EXPCL_PANDA PNMImage : public PNMImageHeader {
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE PNMImage();
|
INLINE PNMImage();
|
||||||
INLINE PNMImage(const Filename &filename, PNMFileType *type = NULL);
|
PNMImage(const Filename &filename, PNMFileType *type = NULL);
|
||||||
INLINE PNMImage(int x_size, int y_size, int num_channels = 3,
|
INLINE PNMImage(int x_size, int y_size, int num_channels = 3,
|
||||||
xelval maxval = 255, PNMFileType *type = NULL);
|
xelval maxval = 255, PNMFileType *type = NULL);
|
||||||
INLINE PNMImage(const PNMImage ©);
|
INLINE PNMImage(const PNMImage ©);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user