Class ImageRenderer


public class ImageRenderer extends Object
Utility class to render the current frame buffer to images
  • Constructor Details

    • ImageRenderer

      public ImageRenderer()
  • Method Details

    • renderToImageGl20

      public static String renderToImageGl20(String absoluteLocation, String baseFileName, int w, int h, Settings.ImageFormat format, float quality)
      Saves the current screen as an image to the given directory using the given file name. The sequence number is added automatically to the file name. This method works with OpenGL 2.0
      absoluteLocation - The location folder
      baseFileName - File name without extension
      w - The width of the image
      h - The height of the image
      format - The format, either JPG or PNG
      quality - Quality, in case of JPG [0..1]
    • renderToPixmap

      public static renderToPixmap(int w, int h)
    • writePixmapToImage

      public static String writePixmapToImage(String absoluteLocation, String baseFileName, pixmap, Settings.ImageFormat format, float quality)
    • getSequenceNumber

      public static int getSequenceNumber()
    • resetSequenceNumber

      public static void resetSequenceNumber()