GIFTranslator: Whitespace style fixes
Also remove break in last case.
This commit is contained in:
@@ -159,9 +159,10 @@ GIFLoad::ReadGIFHeader()
|
||||
unsigned char gp[256 * 3];
|
||||
if (fInput->Read(gp, s * 3) < s * 3)
|
||||
return false;
|
||||
for (int x = 0; x < s; x++) {
|
||||
|
||||
for (int x = 0; x < s; x++)
|
||||
fPalette->SetColor(x, gp[x * 3], gp[x * 3 + 1], gp[x * 3 + 2]);
|
||||
}
|
||||
|
||||
fPalette->backgroundindex = header[11];
|
||||
} else {
|
||||
// install BeOS system palette in case local palette isn't present
|
||||
@@ -182,9 +183,10 @@ bool
|
||||
GIFLoad::ReadGIFLoopBlock()
|
||||
{
|
||||
unsigned char length;
|
||||
if (fInput->Read(&length, 1) < 1) return false;
|
||||
fInput->Seek(length, SEEK_CUR);
|
||||
if (fInput->Read(&length, 1) < 1)
|
||||
return false;
|
||||
|
||||
fInput->Seek(length, SEEK_CUR);
|
||||
do {
|
||||
if (fInput->Read(&length, 1) < 1)
|
||||
return false;
|
||||
|
||||
@@ -139,16 +139,18 @@ GIFSave::GIFSave(BBitmap* bitmap, BPositionIO* output,
|
||||
case WEB_SAFE_PALETTE:
|
||||
syslog(LOG_INFO, "web safe palette\n");
|
||||
break;
|
||||
|
||||
case BEOS_SYSTEM_PALETTE:
|
||||
syslog(LOG_INFO, "BeOS system palette\n");
|
||||
break;
|
||||
|
||||
case GREYSCALE_PALETTE:
|
||||
syslog(LOG_INFO, "greyscale palette\n");
|
||||
break;
|
||||
|
||||
case OPTIMAL_PALETTE:
|
||||
default:
|
||||
syslog(LOG_INFO, "optimal palette\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -106,9 +106,12 @@ static const TranSetting sDefaultSettings[] = {
|
||||
{ GIF_SETTING_TRANSPARENT_BLUE, TRAN_SETTING_INT32, 0 }
|
||||
};
|
||||
|
||||
const uint32 kNumInputFormats = sizeof(sInputFormats) / sizeof(translation_format);
|
||||
const uint32 kNumOutputFormats = sizeof(sOutputFormats) / sizeof(translation_format);
|
||||
const uint32 kNumDefaultSettings = sizeof(sDefaultSettings) / sizeof(TranSetting);
|
||||
const uint32 kNumInputFormats = sizeof(sInputFormats)
|
||||
/ sizeof(translation_format);
|
||||
const uint32 kNumOutputFormats = sizeof(sOutputFormats)
|
||||
/ sizeof(translation_format);
|
||||
const uint32 kNumDefaultSettings = sizeof(sDefaultSettings)
|
||||
/ sizeof(TranSetting);
|
||||
|
||||
|
||||
/*! Look at first few bytes in stream to determine type - throw it back
|
||||
|
||||
Reference in New Issue
Block a user