Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(532)

Unified Diff: tiff/consts.go

Issue 6866051: code review 6866051: tiff: support for writing compressed images. (Closed)
Patch Set: diff -r a0de9da0017e https://code.google.com/p/go.image Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tiff/writer.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tiff/consts.go
===================================================================
--- a/tiff/consts.go
+++ b/tiff/consts.go
@@ -109,9 +109,20 @@
mNRGBA
)
-// Compression describes the type of compression used in Options.
+// CompressionType describes the type of compression used in Options.
type CompressionType int
const (
Uncompressed CompressionType = iota
+ Deflate
)
+
+// specValue returns the compression type constant from the TIFF spec that
+// is equivalent to c.
+func (c CompressionType) specValue() uint32 {
+ switch c {
+ case Deflate:
+ return cDeflate
+ }
+ return cNone
+}
« no previous file with comments | « no previous file | tiff/writer.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b