Package org.jwildfire.create.tina.io

Examples of org.jwildfire.create.tina.io.FlameWriter


    int length = calcFrameNumberLength();
    while (hs.length() < length) {
      hs = "0" + hs;
    }
    filename += hs + "." + Tools.FILEEXT_FLAME;
    new FlameWriter().writeFlame(pFlame, filename);
  }
View Full Code Here


            String flame2XML = new String((byte[]) ress2[j]);
            try {
              Flame flame1 = new FlameReader(pPrefs).readFlamesfromXML(flame1XML).get(0);
              Flame flame2 = new FlameReader(pPrefs).readFlamesfromXML(flame2XML).get(0);
              Flame morphedFlame = morphFlames(pPrefs, FlameMorphType.MORPH, flame1, flame2, pFrame, pFrames);
              String morphedFlameXML = new FlameWriter().getFlameXML(morphedFlame);
              var.getFunc().setRessource(SubFlameWFFunc.RESSOURCE_FLAME, morphedFlameXML.getBytes());
            }
            catch (Exception ex) {
              ex.printStackTrace();
            }
View Full Code Here

              ex.printStackTrace();
            }
          }
          if (chooser.showSaveDialog(rootTabbedPane) == JFileChooser.APPROVE_OPTION) {
            File file = chooser.getSelectedFile();
            new FlameWriter().writeFlame(currFlame, file.getAbsolutePath());
            currFlame.setLastFilename(file.getName());
            prefs.setLastOutputFlameFile(file);
          }
        }
      }
View Full Code Here

      }
      if (res.getHDRIntensityMap() != null) {
        new ImageWriter().saveImage(res.getHDRIntensityMap(), outFile.getAbsolutePath() + ".intensity.hdr");
      }
      if (prefs.isTinaSaveFlamesWhenImageIsSaved()) {
        new FlameWriter().writeFlame(flame, outFile.getParentFile().getAbsolutePath() + File.separator + Tools.trimFileExt(outFile.getName()) + ".flame");
      }
      finished = true;
      finishEvent.succeeded((t1 - t0) * 0.001);
    }
    catch (Throwable ex) {
View Full Code Here

  protected void copyToClipboardBtn_clicked() throws Exception {
    Flame currFlame = getCurrFlame();
    if (currFlame != null) {
      Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
      String xml = new FlameWriter().getFlameXML(currFlame);
      StringSelection data = new StringSelection(xml);
      clipboard.setContents(data, data);
    }
  }
View Full Code Here

            ex.printStackTrace();
          }
        }
        if (chooser.showSaveDialog(centerPanel) == JFileChooser.APPROVE_OPTION) {
          File file = chooser.getSelectedFile();
          new FlameWriter().writeFlame(getCurrFlame(), file.getAbsolutePath());
          getCurrFlame().setLastFilename(file.getName());
          showStatusMessage(getCurrFlame(), "flame saved to disc");
          prefs.setLastOutputFlameFile(file);
        }
      }
View Full Code Here

  public void saveFlameToClipboard() {
    try {
      if (getCurrFlame() != null) {
        Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
        String xml = new FlameWriter().getFlameXML(getCurrFlame());
        StringSelection data = new StringSelection(xml);
        clipboard.setContents(data, data);
        //        try {
        //          System.out.println(new ScriptGenerator(getCurrFlame()).generateScript());
        //        }
View Full Code Here

  public void quicksaveButton_clicked() {
    try {
      if (getCurrFlame() != null) {
        String filename = qsaveFilenameGen.generateNextFilename();
        new FlameWriter().writeFlame(getCurrFlame(), filename);
        showStatusMessage(getCurrFlame(), "quicksave <" + new File(filename).getName() + "> saved");
      }
    }
    catch (Throwable ex) {
      errorHandler.handleError(ex);
View Full Code Here

  private void storeCurrFlame() {
    if (currFlame != null) {
      try {
        String filename = qsaveFilenameGen.generateFilename("jwf_ir_current.flame");
        new FlameWriter().writeFlame(currFlame, filename);
      }
      catch (Exception ex) {
        errorHandler.handleError(ex);
      }
    }
View Full Code Here

        }
        if (res.getHDRIntensityMap() != null) {
          new ImageWriter().saveImage(res.getHDRIntensityMap(), file.getAbsolutePath() + ".intensity.hdr");
        }
        if (prefs.isTinaSaveFlamesWhenImageIsSaved()) {
          new FlameWriter().writeFlame(getCurrFlame(), file.getParentFile().getAbsolutePath() + File.separator + Tools.trimFileExt(file.getName()) + ".flame");
        }
      }
    }
    catch (Throwable ex) {
      errorHandler.handleError(ex);
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.io.FlameWriter

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.