SAVEBIT_GREYSCALE
-
On 24/12/2017 at 14:39, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 19
Platform: Windows ;
Language(s) : C++ ;---------
SAVEBIT_GREYSCALE does not seem to be working in R19.I have following code that is working in R16-R18, but not in R19.
The file is created and save, but not in greyscale but in standard rgb.Could it be, because I save the file using 24 bits?
But then again, it is working (I get a greyscale) in R16-R18.AutoAlloc<BaseBitmap> outFile; outFile->Init(2048, 1024, 24); ... res = outFile->Save(fileLocation, FILTER_JPG, nullptr, SAVEBIT_GREYSCALE);
-
On 28/12/2017 at 08:06, xxxxxxxx wrote:
Hi Pim,
Sorry for the late reply.
There have been internal changes related to images initialization and saving in R19, but the API is still the same and compatibility has been kept as much as possible.
Cinema 4D only supports greyscale bitmaps with 8, 16 and 32 bit depths. This means 24 bit depth is not supported for greyscale bitmaps.
To initialize a greyscale bitmap, pass INITBITMAPFLAGS_GRAYSCALE as fourth argument for BaseBitmap::Init(x, y, depth, flags). Always check the return value of the function to make sure the bitmap was successfully initialized.
Then to save the bitmap, depending on its bit depth and the data to be saved, pass only SAVEBIT_GREYSCALE, or SAVEBIT_16-BIT-CHANNELS|SAVEBIT_GREYSCALE (to save 16-bit greyscale channels), SAVEBIT_32-BIT-CHANNELS|SAVEBIT_GREYSCALE (to save 32-bit greyscale channels) etc.
See the combination of the save flags in paint_saver_test.cpp SDK example here.EDIT: I added - characters in SAVEBIT_16-BIT-CHANNELS and SAVEBIT_32-BIT-CHANNELS because the forum doesn't format these as expected when their correct name is used...
-
On 28/12/2017 at 14:19, xxxxxxxx wrote:
SAVEBIT_16b**chANNELS
I think someone should check the censor algorithm and at least set it to "whole word only". This is fairly ridiculous. (and maybe not even obvious for non-native English speakers)
-
On 29/12/2017 at 01:24, xxxxxxxx wrote:
Originally posted by xxxxxxxx
SAVEBIT_16b**chANNELS
I think someone should check the censor algorithm and at least set it to "whole word only". This is fairly ridiculous. (and maybe not even obvious for non-native English speakers)
Fixed. Still wondering why the text was formatted like this in my post
Edit: It looks like forum doesn't like SAVEBIT 16-bit channels and SAVEBIT 32-bit channels enumeration names...
-
On 29/12/2017 at 11:05, xxxxxxxx wrote:
Well, they do contain the word b i t c h so if there is a swear word censor algorithm behind the forum, I wouldn't be surprised. (Look at how the b and ch are also lowercased... seems to replace the words found with the censored version b**ch)
lemme try...
b**ch wolfb**ch b**ching 16b**channels -
On 29/12/2017 at 11:08, xxxxxxxx wrote:
yeah, thought so. It censors everything regardless whether it's the actual word, or just contains the word in ANY context, even if it's just an unlucky combination like bit - ch annel.
Duh. Now if that happens in code blocks too, this might lead to occasional issues.
b**ch wolfb**ch b**ching 16b**channels
-
On 29/12/2017 at 11:09, xxxxxxxx wrote:
Aaand it does.