1 18 package org.apache.batik.transcoder.image; 19 20 import java.util.HashMap ; 21 import java.util.Map ; 22 23 import org.apache.batik.transcoder.TranscoderInput; 24 25 31 public class MediaTest extends AbstractImageTranscoderTest { 32 33 34 protected String inputURI; 35 36 37 protected String refImageURI; 38 39 40 protected String media; 41 42 49 public MediaTest(String inputURI, String refImageURI, String media) { 50 this.inputURI = inputURI; 51 this.refImageURI = refImageURI; 52 this.media = media; 53 } 54 55 58 protected TranscoderInput createTranscoderInput() { 59 return new TranscoderInput(resolveURL(inputURI).toString()); 60 } 61 62 65 protected Map createTranscodingHints() { 66 Map hints = new HashMap (3); 67 hints.put(ImageTranscoder.KEY_MEDIA, media); 68 return hints; 69 } 70 71 74 protected byte [] getReferenceImageData() { 75 return createBufferedImageData(resolveURL(refImageURI)); 76 } 77 } 78 | Popular Tags |