001 /* 002 * TIFFDecoderUncompressed 003 * 004 * Copyright (c) 2002, 2003 Marco Schmidt. 005 * All rights reserved. 006 */ 007 008 package net.sourceforge.jiu.codecs.tiff; 009 010 import java.io.DataInput; 011 import java.io.IOException; 012 import net.sourceforge.jiu.codecs.tiff.TIFFDecoder; 013 014 /** 015 * A TIFF decoder for uncompressed TIFF files. 016 * @author Marco Schmidt 017 * @since 0.9.0 018 */ 019 public class TIFFDecoderUncompressed extends TIFFDecoder 020 { 021 public void decode() throws IOException 022 { 023 DataInput in = getInput(); 024 byte[] row = new byte[getBytesPerRow()]; 025 for (int y = getY1(); y <= getY2(); y++) 026 { 027 in.readFully(row); 028 putBytes(row, 0, row.length); 029 } 030 } 031 032 public Integer[] getCompressionTypes() 033 { 034 return new Integer[] {new Integer(TIFFConstants.COMPRESSION_NONE)}; 035 } 036 }