|
|
|
@ -200,12 +200,9 @@ PyObject* pyImage::LoadJPEGFromDisk(const wchar_t* filename, uint16_t width, uin
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// let's create a nice name for this thing based on the filename
|
|
|
|
|
plString name = _TEMP_CONVERT_FROM_LITERAL("PtImageFromDisk_"); |
|
|
|
|
char* filetext = hsWStringToString(filename); |
|
|
|
|
name = name + filetext; |
|
|
|
|
delete[] filetext; |
|
|
|
|
plString name = plString::Format("PtImageFromDisk_%s", hsWStringToString(filename)); |
|
|
|
|
|
|
|
|
|
hsgResMgr::ResMgr()->NewKey(name.c_str(), theMipmap, plLocation::kGlobalFixedLoc); |
|
|
|
|
hsgResMgr::ResMgr()->NewKey(name, theMipmap, plLocation::kGlobalFixedLoc); |
|
|
|
|
|
|
|
|
|
return pyImage::New( theMipmap ); |
|
|
|
|
} |
|
|
|
@ -227,7 +224,8 @@ PyObject* pyImage::LoadPNGFromDisk(const wchar_t* filename, uint16_t width, uint
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
name += plString::FromWchar(i); |
|
|
|
|
// let's create a nice name for this thing based on the filename
|
|
|
|
|
plString name = plString::Format("PtImageFromDisk_%s", hsWStringToString(filename)); |
|
|
|
|
|
|
|
|
|
hsgResMgr::ResMgr()->NewKey(name, theMipmap, plLocation::kGlobalFixedLoc); |
|
|
|
|
|
|
|
|
|