Package org.jwildfire.create.tina.render

Examples of org.jwildfire.create.tina.render.RenderInfo


      flame = pFlame;
      preview = pPreview;
    }

    private void generatePreview(int pQuality) {
      RenderInfo info = new RenderInfo(IMG_WIDTH, IMG_HEIGHT, RenderMode.PREVIEW);
      Flame renderFlame = flame.makeCopy();
      double wScl = (double) info.getImageWidth() / (double) renderFlame.getWidth();
      double hScl = (double) info.getImageHeight() / (double) renderFlame.getHeight();
      renderFlame.setPixelsPerUnit((wScl + hScl) * 0.5 * renderFlame.getPixelsPerUnit());
      renderFlame.setWidth(IMG_WIDTH);
      renderFlame.setHeight(IMG_HEIGHT);
      renderFlame.setSampleDensity(prefs.getTinaRenderPreviewQuality());
      renderFlame.setSpatialFilterRadius(0.0);
View Full Code Here


      return;
    }
    refreshImagePanel();
    clearScreen();
    ImgSize size = getImgSize();
    RenderInfo info = new RenderInfo(size.getWidth(), size.getHeight(), RenderMode.PREVIEW);
    double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
    double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
    flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
    flame.setWidth(info.getImageWidth());
    flame.setHeight(info.getImageHeight());
    flame.setSampleDensity(10);
    info.setRenderHDR(prefs.isTinaSaveHDRInIR());
    info.setRenderHDRIntensityMap(false);
    if (flame.getBGColorRed() > 0 || flame.getBGColorGreen() > 0 || flame.getBGColorBlue() > 0) {
      image.fillBackground(flame.getBGColorRed(), flame.getBGColorGreen(), flame.getBGColorBlue());
    }
    renderer = new FlameRenderer(flame, prefs, flame.isBGTransparency(), false);
    renderer.registerIterationObserver(this);
View Full Code Here

          FlameRenderer renderer = new FlameRenderer(flame, prefs, false, true);
          renderer.setProgressUpdater(null);
          flame.setSampleDensity(50);
          flame.setSpatialFilterRadius(0.0);
          RenderInfo info = new RenderInfo(imgWidth, imgHeight, RenderMode.PREVIEW);
          RenderedFlame res = renderer.renderFlame(info);
          currThumbnail = new ImageIcon(res.getImage().getBufferedImg());
        }
      }
    }
View Full Code Here

import org.jwildfire.image.SimpleImage;

public class AnimationService {

  public static SimpleImage renderFrame(Flame flame, int pWidth, int pHeight, Prefs pPrefs) throws Exception {
    RenderInfo info = new RenderInfo(pWidth, pHeight, RenderMode.PRODUCTION);
    double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
    double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
    flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
    flame.setWidth(info.getImageWidth());
    flame.setHeight(info.getImageHeight());
    FlameRenderer renderer = new FlameRenderer(flame, pPrefs, flame.isBGTransparency(), false);
    RenderedFlame res = renderer.renderFlame(info);
    return res.getImage();
  }
View Full Code Here

    private void generatePreview(int pQuality) {
      preview = new SimpleImage(IMG_WIDTH * IMG_COUNT, IMG_HEIGHT - 1);
      for (int i = 0; i < IMG_COUNT; i++) {

        RenderInfo info = new RenderInfo(IMG_WIDTH, IMG_HEIGHT, RenderMode.PREVIEW);
        Flame renderFlame;
        if (movie.getParts().size() > 0) {
          int frame = (int) ((double) movie.getFrameCount() / ((double) IMG_COUNT + 1) * i + 0.5);
          Flame morphedFlame = movie.getFlame(frame);
          renderFlame = movie.createAnimatedFlame(morphedFlame, frame);
        }
        else {
          renderFlame = new Flame();
        }

        double wScl = (double) info.getImageWidth() / (double) renderFlame.getWidth();
        double hScl = (double) info.getImageHeight() / (double) renderFlame.getHeight();
        renderFlame.setPixelsPerUnit((wScl + hScl) * 0.5 * renderFlame.getPixelsPerUnit());
        renderFlame.setWidth(IMG_WIDTH);
        renderFlame.setHeight(IMG_HEIGHT);
        renderFlame.setSpatialFilterRadius(0.0);
        FlameRenderer renderer = new FlameRenderer(renderFlame, prefs, false, false);
View Full Code Here

    swfAnimatorFlamesPanel.getParent().validate();
  }

  private SimpleImage createPartPreview(final FlameMoviePart pPart, int imageWidth, int imageHeight) {
    RenderInfo info = new RenderInfo(imageWidth, imageHeight, RenderMode.PREVIEW);
    Flame flame = pPart.getFlame().makeCopy();
    double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
    double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
    flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
    flame.setWidth(imageWidth);
    flame.setHeight(imageHeight);
    FlameRenderer renderer = new FlameRenderer(flame, prefs, false, false);
    RenderedFlame res = renderer.renderFlame(info);
View Full Code Here

      FlamePanel imgPanel = getFlamePanel();
      Rectangle bounds = imgPanel.getImageBounds();
      int width = bounds.width;
      int height = bounds.height;
      if (width >= 16 && height >= 16) {
        RenderInfo info = new RenderInfo(width, height, RenderMode.PREVIEW);
        Flame flame = getCurrFlame();
        if (flame != null) {
          double oldSpatialFilterRadius = flame.getSpatialFilterRadius();
          double oldSampleDensity = flame.getSampleDensity();
          try {
            double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
            double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
            flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
            flame.setWidth(info.getImageWidth());
            flame.setHeight(info.getImageHeight());

            FlameRenderer renderer = new FlameRenderer(flame, prefs, false, false);
            if (pQuickRender) {
              renderer.setProgressUpdater(null);
              flame.setSampleDensity(1.0);
View Full Code Here

    @Override
    public void run() {
      done = false;
      try {
        RenderInfo info = new RenderInfo(imageWidth, imageHeight, RenderMode.PREVIEW);
        double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
        double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
        flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
        flame.setWidth(imageWidth);
        flame.setHeight(imageHeight);
        flame.setSampleDensity(20.0);
        renderer = new FlameRenderer(flame, prefs, false, false);
View Full Code Here

  public void run() {
    finished = forceAbort = false;
    try {
      int width = resProfile.getWidth();
      int height = resProfile.getHeight();
      RenderInfo info = new RenderInfo(width, height, RenderMode.PRODUCTION);
      double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
      double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
      flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
      flame.setWidth(info.getImageWidth());
      flame.setHeight(info.getImageHeight());
      boolean renderHDR = qualProfile.isWithHDR();
      info.setRenderHDR(renderHDR);
      boolean renderHDRIntensityMap = qualProfile.isWithHDRIntensityMap();
      info.setRenderHDRIntensityMap(renderHDRIntensityMap);
      flame.setSampleDensity(qualProfile.getQuality());
      long t0, t1;
      renderer = new FlameRenderer(flame, prefs, flame.isBGTransparency(), false);
      renderer.setProgressUpdater(progressUpdater);
      t0 = Calendar.getInstance().getTimeInMillis();
View Full Code Here

  }

  public void renderButton_clicked() {
    clearScreen();
    ImgSize size = getImgSize();
    RenderInfo info = new RenderInfo(size.getWidth(), size.getHeight(), RenderMode.PREVIEW);
    Flame flame = getCurrFlame();
    double wScl = (double) info.getImageWidth() / (double) flame.getWidth();
    double hScl = (double) info.getImageHeight() / (double) flame.getHeight();
    flame.setPixelsPerUnit((wScl + hScl) * 0.5 * flame.getPixelsPerUnit());
    flame.setWidth(info.getImageWidth());
    flame.setHeight(info.getImageHeight());
    flame.setSampleDensity(10);
    info.setRenderHDR(prefs.isTinaSaveHDRInIR());
    info.setRenderHDRIntensityMap(false);
    if (flame.getBGColorRed() > 0 || flame.getBGColorGreen() > 0 || flame.getBGColorBlue() > 0) {
      image.fillBackground(flame.getBGColorRed(), flame.getBGColorGreen(), flame.getBGColorBlue());
    }
    renderer = new FlameRenderer(flame, prefs, flame.isBGTransparency(), false);
    renderer.registerIterationObserver(this);
View Full Code Here

TOP

Related Classes of org.jwildfire.create.tina.render.RenderInfo

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.