Package com.im.imjutil.media.image.Image

Examples of com.im.imjutil.media.image.Image.Color


  @Override
  protected Image applyTransform(Image image, Parameter params)
      throws Exception {
    PlanarImage pi = image.getSource();
    Format format = image.getFormat();
    Color color  = image.getColor();
   
    String command = params.get(0);
   
    if (fullEquals("both", command)) {
      format = params.get(1);
View Full Code Here


  private Image openImage(InputStream stream) {
    SeekableStream s = SeekableStream.wrapInputStream(stream, true);
    RenderedOp planarImage = JAI.create("stream", s);
    ((OpImage) planarImage.getRendering()).setTileCache(null);
    Format format = ImageUtil.getFormat(stream);
    Color color = ImageUtil.getColor(planarImage);
   
    return ImageUtil.create(planarImage, format, color);
  }
View Full Code Here

 
  private Image openImage(File file) throws IOException {
    String path = file.getCanonicalPath();
    PlanarImage planarImage = JAI.create("fileload", path);
    Format format = ImageUtil.getFormat(file);
    Color color = ImageUtil.getColor(planarImage);
   
    return ImageUtil.create(planarImage, format, color);
  }
View Full Code Here

  }
 
  private Image openImage(URL url) throws IOException {
    PlanarImage planarImage = JAI.create("url", url);
    Format format = ImageUtil.getFormat(url.openStream());
    Color color = ImageUtil.getColor(planarImage);
   
    return ImageUtil.create(planarImage, format, color);
  }
View Full Code Here

 
  public static Color getColor(PlanarImage image) {
    try {
      int colorType = image.getColorModel().getColorSpace().getType();
     
      Color color;
     
      switch (colorType) {
      case ColorSpace.TYPE_RGB:
        color = Color.RGB;
        break;
View Full Code Here

TOP

Related Classes of com.im.imjutil.media.image.Image.Color

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.