@@ -161,10 +161,10 @@ internal TIFFField() {
161
161
/// </tr>
162
162
/// </table>
163
163
/// </remarks>
164
- /// <param name="tag">The tag</param>
165
- /// <param name="type"/ >
166
- /// <param name="count"/ >
167
- /// <param name="data"/ >
164
+ /// <param name="tag">the tag number </param>
165
+ /// <param name="type">the tag type</param >
166
+ /// <param name="count">the number of data items present in the field</param >
167
+ /// <param name="data">the field data</param >
168
168
public TIFFField ( int tag , int type , int count , Object data ) {
169
169
this . tag = tag ;
170
170
this . type = type ;
@@ -237,6 +237,7 @@ public virtual char[] GetAsChars() {
237
237
/// <para /> A ClassCastException will be thrown if the field is not
238
238
/// of type TIFF_SSHORT.
239
239
/// </remarks>
240
+ /// <returns>TIFF_SSHORT data as an array of shorts (signed 16-bit integers).</returns>
240
241
public virtual short [ ] GetAsShorts ( ) {
241
242
return ( short [ ] ) data ;
242
243
}
@@ -251,6 +252,7 @@ public virtual short[] GetAsShorts() {
251
252
/// <para /> A ClassCastException will be thrown if the field is not
252
253
/// of type TIFF_SLONG.
253
254
/// </remarks>
255
+ /// <returns>TIFF_SLONG data as an array of ints (signed 32-bit integers).</returns>
254
256
public virtual int [ ] GetAsInts ( ) {
255
257
return ( int [ ] ) data ;
256
258
}
@@ -265,6 +267,7 @@ public virtual int[] GetAsInts() {
265
267
/// <para /> A ClassCastException will be thrown if the field is not
266
268
/// of type TIFF_LONG.
267
269
/// </remarks>
270
+ /// <returns>TIFF_LONG data as an array of longs (signed 64-bit integers).</returns>
268
271
public virtual long [ ] GetAsLongs ( ) {
269
272
return ( long [ ] ) data ;
270
273
}
@@ -275,6 +278,7 @@ public virtual long[] GetAsLongs() {
275
278
/// <para /> A ClassCastException will be thrown if the field is not
276
279
/// of type TIFF_FLOAT.
277
280
/// </remarks>
281
+ /// <returns>TIFF_FLOAT data as an array of floats.</returns>
278
282
public virtual float [ ] GetAsFloats ( ) {
279
283
return ( float [ ] ) data ;
280
284
}
@@ -285,6 +289,7 @@ public virtual float[] GetAsFloats() {
285
289
/// <para /> A ClassCastException will be thrown if the field is not
286
290
/// of type TIFF_DOUBLE.
287
291
/// </remarks>
292
+ /// <returns>TIFF_DOUBLE data as an array of doubles.</returns>
288
293
public virtual double [ ] GetAsDoubles ( ) {
289
294
return ( double [ ] ) data ;
290
295
}
@@ -295,6 +300,7 @@ public virtual double[] GetAsDoubles() {
295
300
/// <para /> A ClassCastException will be thrown if the field is not
296
301
/// of type TIFF_ASCII.
297
302
/// </remarks>
303
+ /// <returns>TIFF_ASCII data as an array of strings.</returns>
298
304
public virtual String [ ] GetAsStrings ( ) {
299
305
return ( String [ ] ) data ;
300
306
}
@@ -305,6 +311,7 @@ public virtual String[] GetAsStrings() {
305
311
/// <para /> A ClassCastException will be thrown if the field is not
306
312
/// of type TIFF_SRATIONAL.
307
313
/// </remarks>
314
+ /// <returns>TIFF_SRATIONAL data as an array of 2-element arrays of ints.</returns>
308
315
public virtual int [ ] [ ] GetAsSRationals ( ) {
309
316
return ( int [ ] [ ] ) data ;
310
317
}
@@ -315,6 +322,7 @@ public virtual int[][] GetAsSRationals() {
315
322
/// <para /> A ClassCastException will be thrown if the field is not
316
323
/// of type TIFF_RATTIONAL.
317
324
/// </remarks>
325
+ /// <returns>TIFF_RATIONAL data as an array of 2-element arrays of longs.</returns>
318
326
public virtual long [ ] [ ] GetAsRationals ( ) {
319
327
return ( long [ ] [ ] ) data ;
320
328
}
@@ -335,6 +343,10 @@ public virtual long[][] GetAsRationals() {
335
343
/// TIFF_SSHORT, or TIFF_SLONG.
336
344
/// </remarks>
337
345
/// <param name="index">The index</param>
346
+ /// <returns>
347
+ /// data in TIFF_BYTE, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SHORT, TIFF_SSHORT,
348
+ /// or TIFF_SLONG format as an int.
349
+ /// </returns>
338
350
public virtual int GetAsInt ( int index ) {
339
351
switch ( type ) {
340
352
case TIFF_BYTE :
@@ -380,6 +392,10 @@ public virtual int GetAsInt(int index) {
380
392
/// TIFF_SSHORT, TIFF_SLONG, or TIFF_LONG.
381
393
/// </remarks>
382
394
/// <param name="index">The index</param>
395
+ /// <returns>
396
+ /// data in TIFF_BYTE, TIFF_SBYTE, TIFF_UNDEFINED, TIFF_SHORT, TIFF_SSHORT, TIFF_SLONG,
397
+ /// or TIFF_LONG format as a long.
398
+ /// </returns>
383
399
public virtual long GetAsLong ( int index ) {
384
400
switch ( type ) {
385
401
case TIFF_BYTE :
@@ -415,16 +431,17 @@ public virtual long GetAsLong(int index) {
415
431
416
432
/// <summary>Returns data in any numerical format as a float.</summary>
417
433
/// <remarks>
418
- /// Returns data in any numerical format as a float. Data in
434
+ /// Returns data in any numerical format as a float. Data in
419
435
/// TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by
420
436
/// dividing the numerator into the denominator using
421
437
/// double-precision arithmetic and then truncating to single
422
- /// precision. Data in TIFF_SLONG, TIFF_LONG, or TIFF_DOUBLE
438
+ /// precision. Data in TIFF_SLONG, TIFF_LONG, or TIFF_DOUBLE
423
439
/// format may suffer from truncation.
424
440
/// <para /> A ClassCastException will be thrown if the field is
425
441
/// of type TIFF_UNDEFINED or TIFF_ASCII.
426
442
/// </remarks>
427
443
/// <param name="index">The index</param>
444
+ /// <returns>data in any numerical format as a float.</returns>
428
445
public virtual float GetAsFloat ( int index ) {
429
446
switch ( type ) {
430
447
case TIFF_BYTE : {
@@ -475,16 +492,17 @@ public virtual float GetAsFloat(int index) {
475
492
}
476
493
}
477
494
478
- /// <summary>Returns data in any numerical format as a float .</summary>
495
+ /// <summary>Returns data in any numerical format as a double .</summary>
479
496
/// <remarks>
480
- /// Returns data in any numerical format as a float. Data in
497
+ /// Returns data in any numerical format as a double. Data in
481
498
/// TIFF_SRATIONAL or TIFF_RATIONAL format are evaluated by
482
499
/// dividing the numerator into the denominator using
483
500
/// double-precision arithmetic.
484
501
/// <para /> A ClassCastException will be thrown if the field is of
485
502
/// type TIFF_UNDEFINED or TIFF_ASCII.
486
503
/// </remarks>
487
504
/// <param name="index">The index</param>
505
+ /// <returns>data in any numerical format as a double.</returns>
488
506
public virtual double GetAsDouble ( int index ) {
489
507
switch ( type ) {
490
508
case TIFF_BYTE : {
@@ -542,6 +560,7 @@ public virtual double GetAsDouble(int index) {
542
560
/// of type TIFF_ASCII.
543
561
/// </remarks>
544
562
/// <param name="index">The index</param>
563
+ /// <returns>a TIFF_ASCII data item as a String.</returns>
545
564
public virtual String GetAsString ( int index ) {
546
565
return ( ( String [ ] ) data ) [ index ] ;
547
566
}
@@ -557,6 +576,7 @@ public virtual String GetAsString(int index) {
557
576
/// of type TIFF_SRATIONAL.
558
577
/// </remarks>
559
578
/// <param name="index">The index</param>
579
+ /// <returns>a TIFF_SRATIONAL data item as a two-element array of ints.</returns>
560
580
public virtual int [ ] GetAsSRational ( int index ) {
561
581
return ( ( int [ ] [ ] ) data ) [ index ] ;
562
582
}
@@ -572,6 +592,7 @@ public virtual int[] GetAsSRational(int index) {
572
592
/// of type TIFF_RATIONAL.
573
593
/// </remarks>
574
594
/// <param name="index">The index</param>
595
+ /// <returns>a TIFF_RATIONAL data item as a two-element array of ints</returns>
575
596
public virtual long [ ] GetAsRational ( int index ) {
576
597
if ( type == TIFF_LONG ) {
577
598
return GetAsLongs ( ) ;
0 commit comments