static private GetArrayLongShort ( |
||
dir | ||
tag | int | |
리턴 | long[] |
static long[] GetArrayLongShort(TIFFDirectory dir, int tag)
{
TIFFField field = dir.GetField(tag);
if (field == null)
return null;
long[] offset;
if (field.GetType() == TIFFField.TIFF_LONG)
offset = field.GetAsLongs();
else { // must be short
char[] temp = field.GetAsChars();
offset = new long[temp.Length];
for (int k = 0; k < temp.Length; ++k)
offset[k] = temp[k];
}
return offset;
}