Package railo.runtime.img

Examples of railo.runtime.img.Image.writeOut()


      }
      if(format==FORMAT_PNG)    ChartUtilities.writeBufferedImageAsPNG(os, bi);
      else if(format==FORMAT_JPGChartUtilities.writeBufferedImageAsJPEG(os, bi);
      else if(format==FORMAT_GIF)  {
        img = new railo.runtime.img.Image(bi);
        img.writeOut(os, "gif",1,true);
       
        //throw new ApplicationException("format gif not supported");
      }
      else if(format==FORMAT_FLASH)throw new ApplicationException("format flash not supported");
    }
View Full Code Here


 
  @Override
  public void writeOut(PageContext pc,Object source, OutputStream os) throws ConverterException, IOException {
    try {
      Image img = Image.createImage(pc, source, false, true,true,format);
      img.writeOut(os, format, 1, false);
    }
    catch (IOException ioe) {
      throw ioe;
    }
    catch (Exception e) {
View Full Code Here

      height=  (int)((height)*s);
     
     
    }
    Image img=toImage(page, width, height,transparent);
    img.writeOut(destination,format, overwrite, 1f);
  }

  private PDFFile toPDFFile(File file) throws IOException {
    RandomAccessFile raf = new RandomAccessFile(file, "r");
        FileChannel channel = raf.getChannel();
View Full Code Here

    } catch (PdfException e) {
      throw Caster.toPageException(e);
    }
    if(scale!=100)
      img.resize(scale, goodQuality?"highestquality":"highperformance", 1);
    img.writeOut(destination,format, overwrite, 1f);
  }


  public Image toImage(byte[] input,int page) throws IOException, PageException {
     try {
View Full Code Here

  private static void writeImage(Document document, int page, Resource destination,String format, int scale,
      boolean overwrite, boolean goodQuality, boolean transparent) throws PageException, IOException {
   
    BufferedImage bi=toBufferedImage(document,page,scale/100f,transparent);
    Image img = new Image(bi);
    img.writeOut(destination,format, overwrite, goodQuality?1f:0.5f);
  }
 


  private Document toDocument(byte[] input) throws PageException {
View Full Code Here

      throw new FunctionException(pc,"ImageWrite",3,"quality","value have to be between 0 and 1");
   
    // MUST beide boolschen argumente checken
    if(destination==null) return null;
    try {
      image.writeOut(ResourceUtil.toResourceNotExisting(pc, destination), overwrite , (float)quality);
    } catch (IOException e) {
      throw Caster.toPageException(e);
    }
    return null;
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.