public static string? opt_url = null;
public static uint opt_delay = 0;
public static string opt_target_png = null;
- public static string opt_target_pdf = null;
+ public static string opt_target_jpg = null;
public static string[]? opt_inject_js = null;
const OptionEntry[] options = {
{ "url", 0, 0, OptionArg.STRING, ref opt_url, "Url to grab", null },
{ "delay", 0, 0, OptionArg.INT, ref opt_delay, "Delay before snapshot in seconds", null },
- { "png", 0, 0, OptionArg.STRING, ref opt_target_png, "File to write (PNG)", null },
+ { "jpg", 0, 0, OptionArg.STRING, ref opt_target_png, "File to write (JPG)", null },
{ "inject", 0, 0, OptionArg.STRING_ARRAY, ref opt_inject_js, "Inject Javascript file(s)", null },
{ "pdf", 0, 0, OptionArg.STRING, ref opt_target_pdf, "File to write (PDF)", null },
{ null }
if (webkitpdf.opt_url == null) {
throw new OptionError.BAD_VALUE("missing url");
}
- if (webkitpdf.opt_target_png == null && webkitpdf.opt_target_pdf == null) {
- throw new OptionError.BAD_VALUE("missing pdf or png filename");
+ if (webkitpdf.opt_target_jpg == null && webkitpdf.opt_target_pdf == null) {
+ throw new OptionError.BAD_VALUE("missing pdf or jpg filename");
}
if (webkitpdf.opt_target_pdf == null) {
throw new OptionError.BAD_VALUE("missing pdf file path");