archaeology
11-23-2004, 06:09 PM
Does anyone know anything about the MImage object? Any advice on this is greatly appreciated. Here's the problem, I'm writing an exporter for X3D format and want to resize textures on export. Basically I've got everything working correctly except calling the resize procedure on an MImage object doesn't seem to do anything. The exported textures end up being the same size as the originals. I'm at a loss as to why. I posted on highend3d.com... nobody seemed to be able to find anything wrong with my code. I'm at a loss. The adjTexture variable is set to true, because the word "yes" prints out in the Output Window. See is my code below:
if(adjTexture)
{
int fWidth = x3dTextureWidth;
int fHeight = x3dTextureHeight;
fImage.resize(fWidth, fHeight, false);
msg.set("yes");
cout << msg << endl;
}
MString writeOutPath(localImagePath);
writeOutPath.operator +=(fileParts.operator [](0));
writeOutPath.operator +=(".");
writeOutPath.operator +=(fileParts.operator [](1));
fImage.writeToFile(writeOutPath, fileParts.operator [](1));
Any adivce someone can give on this is greatly appreciated.
Thanks,
Aaron
if(adjTexture)
{
int fWidth = x3dTextureWidth;
int fHeight = x3dTextureHeight;
fImage.resize(fWidth, fHeight, false);
msg.set("yes");
cout << msg << endl;
}
MString writeOutPath(localImagePath);
writeOutPath.operator +=(fileParts.operator [](0));
writeOutPath.operator +=(".");
writeOutPath.operator +=(fileParts.operator [](1));
fImage.writeToFile(writeOutPath, fileParts.operator [](1));
Any adivce someone can give on this is greatly appreciated.
Thanks,
Aaron
