PSDTranslator: Codestyle cleanup
This commit is contained in:
parent
857bfe579b
commit
a38a6547d7
@ -122,8 +122,9 @@ PSDTranslator::DerivedTranslate(BPositionIO *source,
|
||||
uint32 outType, BPositionIO *target, int32 baseType)
|
||||
{
|
||||
if (outType != B_TRANSLATOR_BITMAP
|
||||
&& outType != PSD_IMAGE_FORMAT)
|
||||
&& outType != PSD_IMAGE_FORMAT) {
|
||||
return B_NO_TRANSLATOR;
|
||||
}
|
||||
|
||||
switch (baseType) {
|
||||
case 0:
|
||||
@ -149,11 +150,10 @@ PSDTranslator::DerivedTranslate(BPositionIO *source,
|
||||
}
|
||||
|
||||
|
||||
|
||||
status_t
|
||||
PSDTranslator::_TranslateFromBits(BPositionIO* stream,
|
||||
BMessage* ioExtension, uint32 outType,
|
||||
BPositionIO* target)
|
||||
BMessage* ioExtension, uint32 outType,
|
||||
BPositionIO* target)
|
||||
{
|
||||
TranslatorBitmap bitsHeader;
|
||||
status_t result;
|
||||
@ -162,8 +162,9 @@ PSDTranslator::_TranslateFromBits(BPositionIO* stream,
|
||||
return result;
|
||||
|
||||
if (bitsHeader.colors != B_RGB32
|
||||
&& bitsHeader.colors != B_RGBA32)
|
||||
&& bitsHeader.colors != B_RGBA32) {
|
||||
return B_NO_TRANSLATOR;
|
||||
}
|
||||
|
||||
uint32 width = bitsHeader.bounds.IntegerWidth() + 1;
|
||||
uint32 height = bitsHeader.bounds.IntegerHeight() + 1;
|
||||
@ -174,7 +175,7 @@ PSDTranslator::_TranslateFromBits(BPositionIO* stream,
|
||||
uint8 *buff = new uint8[layerSize * layersCount];
|
||||
|
||||
uint8 *ptr = buff;
|
||||
for(int i = 0; i < layerSize; i++) {
|
||||
for (int i = 0; i < layerSize; i++) {
|
||||
uint8 rgba[4];
|
||||
stream->Read(rgba, sizeof(uint32));
|
||||
ptr[i] = rgba[2];
|
||||
|
Loading…
Reference in New Issue
Block a user