ScaleIt returns all black
On 28/04/2016 at 03:10, xxxxxxxx wrote:
Cinema 4D Version: 15
Platform: Windows ;
Language(s) : C++ ;
I am trying to convert a 32 bits file with resolution 4000x2000 to a 8 bits file with resolution 1200x600.
It always returns a file with black contents.
The input file is correct. I see it correctly in the preview window.
AutoAlloc<BaseBitmap> outFile; outFile->Init(4000,2000, 24); .... outFile is created AutoAlloc<BaseBitmap> demoFile; demoFile->Init(1200, 600, 8); outFile->ScaleIt(demoFile, 256, true, false); res = demoFile->Save(demoLocation, FILTER_JPG, nullptr, SAVEBIT_0); if (res != IMAGERESULT_OK) GePrint("Error saving DEMO file: " + demoLocation.GetString());
On 28/04/2016 at 06:19, xxxxxxxx wrote:
INITBITMAPFLAGS_GRAYSCALE has to be passed to Init() (4th argument INITBITMAPFLAGSflags) for 8 bits bitmaps.
On 28/04/2016 at 12:28, xxxxxxxx wrote:
Thanks Yannick, I will give a try and report back.
Yes, it works. Thanks.