Skip to content

Instantly share code, notes, and snippets.

View danialfarid's full-sized avatar

Danial Farid danialfarid

View GitHub Profile
@danialfarid
danialfarid / JavaFXHtmlImageCapture.java
Last active November 20, 2019 17:31
Java Image Capture, HTML Snapshot, HTML to image, no external dependencies. Using JavaFX for supporting Operating Systems
import javafx.animation.AnimationTimer;
import javafx.animation.PauseTransition;
import javafx.application.Application;
import javafx.application.Platform;
import javafx.embed.swing.SwingFXUtils;
import javafx.geometry.Rectangle2D;
import javafx.scene.Scene;
import javafx.scene.SnapshotParameters;
import javafx.scene.image.WritableImage;
import javafx.scene.layout.VBox;