1 31 package org.pdfbox.pdmodel.graphics.predictor; 32 33 43 public class None extends PredictorAlgorithm 44 { 45 54 public void encode(byte[] src, byte[] dest) 55 { 56 checkBufsiz(dest, src); 57 System.arraycopy(src,0,dest,0,src.length); 58 } 59 60 69 public void decode(byte[] src, byte[] dest) 70 { 71 System.arraycopy(src,0,dest,0,src.length); 72 } 73 74 75 76 79 public void encodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, 80 int destDy, int destOffset) 81 { 82 int bpl = getWidth() * getBpp(); 83 for (int x = 0; x < bpl; x++) 84 { 85 dest[destOffset + x] = src[srcOffset + x]; 86 } 87 } 88 89 92 public void decodeLine(byte[] src, byte[] dest, int srcDy, int srcOffset, 93 int destDy, int destOffset) 94 { 95 int bpl = getWidth() * getBpp(); 96 for (int x = 0; x < bpl; x++) 97 { 98 dest[destOffset + x] = src[srcOffset + x]; 99 } 100 } 101 102 } 103 | Popular Tags |