From 57c530e27bb13687d674fb7abba03d414ab814fb Mon Sep 17 00:00:00 2001 From: Felix Riemann Date: Sat, 22 Apr 2017 14:11:23 +0200 Subject: Avoid recompressing JPEGs as PNG when printing Use cairo's feature to simply attach the source file data to the printing surface. This reduces the file size of the resulting PDF file pretty much to the source file size. https://bugzilla.gnome.org/show_bug.cgi?id=394260 taken from: https://git.gnome.org/browse/eog/commit/?id=7029dfe --- src/eom-image.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/eom-image.c') diff --git a/src/eom-image.c b/src/eom-image.c index 8fb9311..1627f2a 100644 --- a/src/eom-image.c +++ b/src/eom-image.c @@ -2350,6 +2350,14 @@ eom_image_get_transform (EomImage *img) return img->priv->trans; } +EomTransform* +eom_image_get_autorotate_transform (EomImage *img) +{ + g_return_val_if_fail (EOM_IS_IMAGE (img), NULL); + + return img->priv->trans_autorotate; +} + /** * eom_image_file_changed: * @img: a #EomImage @@ -2373,3 +2381,12 @@ eom_image_is_file_changed (EomImage *img) return img->priv->file_is_changed; } + +gboolean +eom_image_is_jpeg (EomImage *img) +{ + g_return_val_if_fail (EOM_IS_IMAGE (img), FALSE); + + return ((img->priv->file_type != NULL) && (g_ascii_strcasecmp (img->priv->file_type, EOM_FILE_FORMAT_JPEG) == 0)); +} + -- cgit v1.2.1