{"action":"created","issue":{"url":"https://api.github.com/repos/okamstudio/godot/issues/1529","labels_url":"https://api.github.com/repos/okamstudio/godot/issues/1529/labels{/name}","comments_url":"https://api.github.com/repos/okamstudio/godot/issues/1529/comments","events_url":"https://api.github.com/repos/okamstudio/godot/issues/1529/events","html_url":"https://github.com/okamstudio/godot/issues/1529","id":63054883,"number":1529,"title":"Screen capture upside down","user":{"login":"jotson","id":1168026,"avatar_url":"https://avatars.githubusercontent.com/u/1168026?v=3","gravatar_id":"","url":"https://api.github.com/users/jotson","html_url":"https://github.com/jotson","followers_url":"https://api.github.com/users/jotson/followers","following_url":"https://api.github.com/users/jotson/following{/other_user}","gists_url":"https://api.github.com/users/jotson/gists{/gist_id}","starred_url":"https://api.github.com/users/jotson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jotson/subscriptions","organizations_url":"https://api.github.com/users/jotson/orgs","repos_url":"https://api.github.com/users/jotson/repos","events_url":"https://api.github.com/users/jotson/events{/privacy}","received_events_url":"https://api.github.com/users/jotson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-19T18:09:31Z","updated_at":"2015-03-25T18:09:35Z","closed_at":null,"body":"The PNG file saved with the following code is saved upside down (vertically flipped). Also the alpha in shadows appears to be saved incorrectly.\r\n\r\n```GDScript\r\nvar capture = get_viewport().get_screen_capture()\r\nif !capture.empty():\r\n\tcapture.save_png(\"screenshot.png\")\r\n```\r\n\r\nHere's how the scene looks on my screen while the game is running. This is correct:\r\n\r\n![Actual game screen](https://dl.dropboxusercontent.com/u/7063628/godot-screencap/screenshot-actual.png)\r\n\r\nHere's an example image using the code above. The lowest layer in the scene is the water and ground which are 100% opaque. The alpha from the shadows in this screenshot are not blending correctly with the lower layers in the scene. You can see the transparency problem better if you download the PNG and view it in an image editing program.\r\n\r\n![Sample RGBA PNG](https://dl.dropboxusercontent.com/u/7063628/godot-screencap/screenshot-rgba.png)\r\n\r\nI can fix the alpha so that it is correctly blended by changing the code but it is still flipped:\r\n\r\n`capture.converted(Image.FORMAT_RGB).save_png(\"screenshot.png\")`\r\n\r\n![Sample RGB PNG](https://dl.dropboxusercontent.com/u/7063628/godot-screencap/screenshot-rgb.png)"},"comment":{"url":"https://api.github.com/repos/okamstudio/godot/issues/comments/86153716","html_url":"https://github.com/okamstudio/godot/issues/1529#issuecomment-86153716","issue_url":"https://api.github.com/repos/okamstudio/godot/issues/1529","id":86153716,"user":{"login":"reduz","id":6265307,"avatar_url":"https://avatars.githubusercontent.com/u/6265307?v=3","gravatar_id":"","url":"https://api.github.com/users/reduz","html_url":"https://github.com/reduz","followers_url":"https://api.github.com/users/reduz/followers","following_url":"https://api.github.com/users/reduz/following{/other_user}","gists_url":"https://api.github.com/users/reduz/gists{/gist_id}","starred_url":"https://api.github.com/users/reduz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reduz/subscriptions","organizations_url":"https://api.github.com/users/reduz/orgs","repos_url":"https://api.github.com/users/reduz/repos","events_url":"https://api.github.com/users/reduz/events{/privacy}","received_events_url":"https://api.github.com/users/reduz/received_events","type":"User","site_admin":false},"created_at":"2015-03-25T18:09:35Z","updated_at":"2015-03-25T18:09:35Z","body":"This is kinda stupid, but it's incompatibility between desktop gl and\nmobile gl. Just needs an ifdef i think\n On Mar 25, 2015 2:16 PM, \"John Watson\" <notifications@github.com> wrote:\n\n> A line that flipped the screen capture was commented out in abbea4d\n> <https://github.com/okamstudio/godot/commit/abbea4d945bbb1114570c3b6c7f649e01ca8ebb8>\n> RasterizerGLES2::capture_viewport():\n>\n> //r_capture->flip_y();\n>\n> If I uncomment that line, screen captures come out the right way for me. I\n> don't understand enough why that was commented to feel confident making a\n> pull request.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/okamstudio/godot/issues/1529#issuecomment-86127580>.\n>\n"}}