Permalink
Browse files

Opacity is always the 4th sample.

  • Loading branch information...
1 parent dd434c5 commit a2153f8b48d1eec376b66514a3f0b6fb29edafe6 @GPHemsley committed Nov 21, 2012
Showing with 3 additions and 8 deletions.
  1. +3 −8 tiff.js
View
11 tiff.js
@@ -619,14 +619,9 @@ TIFFParser.prototype = {
var opacity = 1.0;
if (numExtraSamples > 0) {
- for (var k = 0; k < numExtraSamples; k++) {
- if (extraSamplesValues[k] === 1) {
- // Clamp opacity to the range [0,1].
- opacity = pixelSamples[3 + k] / 256;
-
- break;
- }
- }
+ // Opacity is always the 4th sample.
+ // Clamp opacity to the range [0,1].
+ opacity = pixelSamples[3] / 256;
}
switch (photometricInterpretation) {

0 comments on commit a2153f8

Please sign in to comment.