diff --git a/src/ag-chart.c b/src/ag-chart.c index 60ea2cc..d3e9d6b 100644 --- a/src/ag-chart.c +++ b/src/ag-chart.c @@ -1983,11 +1983,12 @@ ag_chart_get_pixbuf(AgChart *chart, return pixbuf; } -void -ag_chart_export_jpg_to_file(AgChart *chart, - GFile *file, - AgDisplayTheme *theme, - GError **err) +static void +ag_chart_export_to_image(AgChart *chart, + GFile *file, + AgDisplayTheme *theme, + gchar *format, + GError **err) { gchar *jpg; gsize jpg_length; @@ -2003,7 +2004,7 @@ ag_chart_export_jpg_to_file(AgChart *chart, pixbuf, &jpg, &jpg_length, - "jpeg", + format, err, NULL )) { @@ -2029,6 +2030,15 @@ ag_chart_export_jpg_to_file(AgChart *chart, g_free(jpg); } +void +ag_chart_export_jpg_to_file(AgChart *chart, + GFile *file, + AgDisplayTheme *theme, + GError **err) +{ + ag_chart_export_to_image(chart, file, theme, "jpeg", err); +} + void ag_chart_set_note(AgChart *chart, const gchar *note) {