[gnome-games/wip/save-aspect-ratio] retro: Save aspect ratio of the screenshots
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/save-aspect-ratio] retro: Save aspect ratio of the screenshots
- Date: Wed, 1 Feb 2017 07:09:39 +0000 (UTC)
commit 19dbc5629ecc18a8619259a2630ea04d4e9848a1
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Jan 27 14:31:42 2017 +0100
retro: Save aspect ratio of the screenshots
This is needed to later be able to display the screenshot with the
correct aspect ratio without resizing it and hence loosing details.
src/retro/retro-runner.vala | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/retro/retro-runner.vala b/src/retro/retro-runner.vala
index 7690d78..235b992 100644
--- a/src/retro/retro-runner.vala
+++ b/src/retro/retro-runner.vala
@@ -484,7 +484,9 @@ public class Games.RetroRunner : Object, Runner {
var screenshot_path = get_screenshot_path ();
- pixbuf.save (screenshot_path, "png");
+ var x_dpi = pixbuf.get_option ("x-dpi");
+ var y_dpi = pixbuf.get_option ("y-dpi");
+ pixbuf.save (screenshot_path, "png", "x-dpi", x_dpi, "y-dpi", y_dpi);
}
private void load_screenshot () throws Error {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]