GIFTranslator: Style fix, rename cs to colorSpace
This commit is contained in:
@@ -47,11 +47,12 @@ GIFSave::GIFSave(BBitmap* bitmap, BPositionIO* output,
|
|||||||
TranslatorSettings* settings)
|
TranslatorSettings* settings)
|
||||||
{
|
{
|
||||||
fSettings = settings;
|
fSettings = settings;
|
||||||
color_space cs = bitmap->ColorSpace();
|
color_space colorSpace = bitmap->ColorSpace();
|
||||||
if (cs != B_RGB32 && cs != B_RGBA32 && cs != B_RGB32_BIG
|
if (colorSpace != B_RGB32 && colorSpace != B_RGBA32
|
||||||
&& cs != B_RGBA32_BIG) {
|
&& colorSpace != B_RGB32_BIG && colorSpace != B_RGBA32_BIG) {
|
||||||
if (debug)
|
if (debug)
|
||||||
syslog(LOG_ERR, "GIFSave::GIFSave() - Unknown color space\n");
|
syslog(LOG_ERR, "GIFSave::GIFSave() - Unknown color space\n");
|
||||||
|
|
||||||
fatalerror = true;
|
fatalerror = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -380,16 +381,16 @@ unsigned char
|
|||||||
GIFSave::NextPixel(int pixel)
|
GIFSave::NextPixel(int pixel)
|
||||||
{
|
{
|
||||||
int bpr = bitmap->BytesPerRow();
|
int bpr = bitmap->BytesPerRow();
|
||||||
color_space cs = bitmap->ColorSpace();
|
color_space colorSpace = bitmap->ColorSpace();
|
||||||
bool useAlphaForTransparency =
|
bool useAlphaForTransparency = colorSpace == B_RGBA32_BIG
|
||||||
(fSettings->SetGetBool(GIF_SETTING_USE_TRANSPARENT_AUTO)
|
|| (fSettings->SetGetBool(GIF_SETTING_USE_TRANSPARENT_AUTO)
|
||||||
&& cs == B_RGBA32) || cs == B_RGBA32_BIG;
|
&& colorSpace == B_RGBA32);
|
||||||
unsigned char r;
|
unsigned char r;
|
||||||
unsigned char g;
|
unsigned char g;
|
||||||
unsigned char b;
|
unsigned char b;
|
||||||
unsigned char a;
|
unsigned char a;
|
||||||
|
|
||||||
if (cs == B_RGB32 || cs == B_RGBA32) {
|
if (colorSpace == B_RGB32 || colorSpace == B_RGBA32) {
|
||||||
b = gifbits[0];
|
b = gifbits[0];
|
||||||
g = gifbits[1];
|
g = gifbits[1];
|
||||||
r = gifbits[2];
|
r = gifbits[2];
|
||||||
|
|||||||
Reference in New Issue
Block a user