LEFT | RIGHT |
(no file at all) | |
1 // Copyright 2011 The Go Authors. All rights reserved. | 1 // Copyright 2011 The Go Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style | 2 // Use of this source code is governed by a BSD-style |
3 // license that can be found in the LICENSE file. | 3 // license that can be found in the LICENSE file. |
4 | 4 |
5 package tiff | 5 package tiff |
6 | 6 |
7 // A tiff image file contains one or more images. The metadata | 7 // A tiff image file contains one or more images. The metadata |
8 // of each image is contained in an Image File Directory (IFD), | 8 // of each image is contained in an Image File Directory (IFD), |
9 // which contains entries of 12 bytes each and is described | 9 // which contains entries of 12 bytes each and is described |
10 // on page 14-16 of the specification. An IFD entry consists of | 10 // on page 14-16 of the specification. An IFD entry consists of |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 const ( | 102 const ( |
103 mBilevel imageMode = iota | 103 mBilevel imageMode = iota |
104 mPaletted | 104 mPaletted |
105 mGray | 105 mGray |
106 mGrayInvert | 106 mGrayInvert |
107 mRGB | 107 mRGB |
108 mRGBA | 108 mRGBA |
109 mNRGBA | 109 mNRGBA |
110 ) | 110 ) |
111 | 111 |
112 // Compression describes the type of compression used in Options. | 112 // CompressionType describes the type of compression used in Options. |
113 type CompressionType int | 113 type CompressionType int |
114 | 114 |
115 const ( | 115 const ( |
116 Uncompressed CompressionType = iota | 116 Uncompressed CompressionType = iota |
| 117 Deflate |
117 ) | 118 ) |
| 119 |
| 120 // specValue returns the compression type constant from the TIFF spec that |
| 121 // is equivalent to c. |
| 122 func (c CompressionType) specValue() uint32 { |
| 123 switch c { |
| 124 case Deflate: |
| 125 return cDeflate |
| 126 } |
| 127 return cNone |
| 128 } |
LEFT | RIGHT |