Screenshots don't work

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
Dvondrake
Prole
Posts: 29
Joined: Sun Oct 26, 2008 5:53 pm

Screenshots don't work

Post by Dvondrake »

---
Last edited by Dvondrake on Mon Jan 21, 2019 10:20 pm, edited 1 time in total.
User avatar
osgeld
Party member
Posts: 303
Joined: Sun Nov 23, 2008 10:13 pm

Re: Screenshots don't work

Post by osgeld »

whats your os?
Dvondrake
Prole
Posts: 29
Joined: Sun Oct 26, 2008 5:53 pm

Re: Screenshots don't work

Post by Dvondrake »

---
Last edited by Dvondrake on Mon Jan 21, 2019 10:20 pm, edited 1 time in total.
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Screenshots don't work

Post by Merkoth »

Disclaimer: I've never used this feature. Now, this might seem like a stupid question but, have you tried making sure the screenshot is taken after all drawing has been done?

Example:

Code: Select all

function draw_stuff()
	-- draw teh stuffs
	love.graphics.draw(mah_hump)
	love.graphics.draw(mah_hump_mah_hump)
	love.graphics.draw(mah_hump_mah_hump_mah_hump)
	-- and then take the screenshot
	love.graphics.screenshot()
end
Otherwise LÖVE might be trying to dump an empty buffer. But I might be pulling facts right from my rear end :P
Dvondrake
Prole
Posts: 29
Joined: Sun Oct 26, 2008 5:53 pm

Re: Screenshots don't work

Post by Dvondrake »

---
Last edited by Dvondrake on Mon Jan 21, 2019 10:20 pm, edited 1 time in total.
User avatar
Merkoth
Party member
Posts: 186
Joined: Mon Feb 04, 2008 11:43 pm
Location: Buenos Aires, Argentina

Re: Screenshots don't work

Post by Merkoth »

This be a bug! A bug I say!

Your screenshot should look like this, right?
Image

LÖVE is putting a wrong header into the bmp so most image editors will fail trying to load it. It should be trivial to fix for the next release, I guess.

I tried to write a little Lua function to insert the missing bytes, but it failed miserably, probably because of encoding problems. I'm still wondering why when I call file:write(0x42) Lua will write 0x36 to the file but who knows...
Dvondrake
Prole
Posts: 29
Joined: Sun Oct 26, 2008 5:53 pm

Re: Screenshots don't work

Post by Dvondrake »

---
Last edited by Dvondrake on Mon Jan 21, 2019 10:19 pm, edited 1 time in total.
User avatar
rude
Administrator
Posts: 1052
Joined: Mon Feb 04, 2008 3:58 pm
Location: Oslo, Norway

Re: Screenshots don't work

Post by rude »

Merkoth wrote:This be a bug! A bug I say!
Yeah, it probably is.
Jammang
Prole
Posts: 8
Joined: Thu Dec 04, 2008 8:13 am

Re: Screenshots don't work

Post by Jammang »

I'm frustrated that the next release of Love isn't out yet which hopefully will have a fix for this.

Does anyone know a way to get around this bug while we wait for the next release? (for windows)
User avatar
Robin
The Omniscient
Posts: 6506
Joined: Fri Feb 20, 2009 4:29 pm
Location: The Netherlands
Contact:

Re: Screenshots don't work

Post by Robin »

Well, (talking about digging up old threads :P that was six months ago...)

You could either use the Print Screen key, or you might try to replicate what Merkoth did -- but you'll have to do that on your own, since Merkoth is very passive lately.
Help us help you: attach a .love.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 5 guests