@@ -80,14 +80,14 @@ -(T4Matrix*)loadMatrixFromFile: (T4File*)aFile
80
80
else
81
81
imageHeight = theImageHeight;
82
82
83
- int imageMaxValue = 0 ;
83
+ int pnmMaxValue = 0 ;
84
84
if ( (pnmType != 4 ) && (pnmType != 1 ) )
85
85
{
86
86
stringBuffer = [file stringToEndOfLine ];
87
87
if (!stringBuffer)
88
88
T4Error (@" PNMLoader: file is not in a PNM format" );
89
89
charBuffer = [stringBuffer cString ];
90
- sscanf (charBuffer, " %d " , &imageMaxValue );
90
+ sscanf (charBuffer, " %d " , &pnmMaxValue );
91
91
}
92
92
93
93
int theImageType;
@@ -103,7 +103,7 @@ -(T4Matrix*)loadMatrixFromFile: (T4File*)aFile
103
103
else
104
104
imageType = theImageType;
105
105
106
- T4Message (@" PNMLoader: detected image: <%d x %d > with max value: <%d > [mode %d ]" , imageWidth, imageHeight, imageMaxValue , pnmType);
106
+ T4Message (@" PNMLoader: detected image: <%d x %d > with max value: <%d > [mode %d ]" , imageWidth, imageHeight, pnmMaxValue , pnmType);
107
107
108
108
// Reading
109
109
@@ -181,7 +181,7 @@ -(T4Matrix*)loadMatrixFromFile: (T4File*)aFile
181
181
182
182
case 5 :
183
183
case 6 :
184
- if (imageMaxValue > 255 )
184
+ if (pnmMaxValue > 255 )
185
185
{
186
186
ucharBuffer = (unsigned char *)[T4Allocator sysAllocByteArrayWithCapacity: matrixSize*2 ];
187
187
@@ -197,7 +197,7 @@ -(T4Matrix*)loadMatrixFromFile: (T4File*)aFile
197
197
{
198
198
ucharBuffer = (unsigned char *)[T4Allocator sysAllocByteArrayWithCapacity: matrixSize];
199
199
200
- if ([file readBlocksInto: ucharBuffer blockSize: 1 numberOfBlocks: matrixSize* 2 ] != matrixSize)
200
+ if ([file readBlocksInto: ucharBuffer blockSize: 1 numberOfBlocks: matrixSize] != matrixSize)
201
201
T4Error (@" PNMLoader: error while reading" );
202
202
203
203
for (i = 0 ; i < matrixSize; i++)
0 commit comments