summaryrefslogtreecommitdiff
path: root/src/eom-image.c
diff options
context:
space:
mode:
authorFelix Riemann <[email protected]>2017-04-22 14:11:23 +0200
committerraveit65 <[email protected]>2017-04-28 08:23:00 +0200
commit47fe5f2bb57680dfcbb4063ddd7fa9c808562b8c (patch)
treec606684e9ec28e96e1b2bdb09e7567da23256828 /src/eom-image.c
parent6362acf0a43d91db96e1a64ede965bb930759983 (diff)
downloadeom-47fe5f2bb57680dfcbb4063ddd7fa9c808562b8c.tar.bz2
eom-47fe5f2bb57680dfcbb4063ddd7fa9c808562b8c.tar.xz
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
Diffstat (limited to 'src/eom-image.c')
-rw-r--r--src/eom-image.c17
1 files changed, 17 insertions, 0 deletions
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));
+}
+