OpenXcom Forum
OpenXcom => Suggestions => Topic started by: moriarty on September 01, 2012, 08:40:59 pm
-
it would be really nice if the screendumps that you can so conveniently create in openxcom using the F12 key could actually be posted here without having to convert them... just saying.
-
no need convert.
only rename extension
screen000x.bmp -> screen000x.jpg
screen000x.bmp -> screen000x.png
attach. test: .bmp > .jpg / .bmp > .png
---
EDIT
btw. rename in game .bmp > .jpg or .png work 100% on winxp32
Screen.cpp
ss << Options::getUserFolder() << "screen" << std::setfill('0') << std::setw(3) << i << ".bmp";
-
Seriously? Come on. Okay, it kind of makes sense - the forum simply checks for supported extension, the browser displays anyway... but that's a really, really cheap workaround, wouldn't you agree? ;D
Considering the un-compressedness of .bmp it is of course easy to use as a screen dump. But I'd still prefer one of my two options from the thread title 8)
-
really cheap workaround, wouldn't you agree? ;D
yes ;)
You want to add .bmp to the option of the enclosures of the forum?
Or alter .bmp on .png in the code of the game?
-
Either would be nice for error reporting... but saving directly to .png would be more elegant in the long run.
-
the only change in the game ".bmp" on ".png" he does not influence the size of the saved screenshot file...
-
I've allowed attaching .bmp files, so you don't need to rename files ;)
On the long run it would be better of course to save screendumps in png.
-
Thank you michal!
-
:)
-
Are you kidding? 346kb BMP instead of 4kb png - is an alternative?
Haven't heard of something more lame than that...
You may rename it even into .TXT or even .WAV - it will stay .BMP file...
-
You are right. What "alternative"?
I also think that you did not understand the whole conversation.
Either would be nice for error reporting... but saving directly to .png would be more elegant in the long run.
the only change in the game ".bmp" on ".png" he does not influence the size of the saved screenshot file...
The problem related to placing .bmp screenshots on the forum. He was solved by Michal [forum options].
-
I'm definitely removing BMP support from the forum as soon as OpenXcom doesn't use it anymore, it's horrifying! (some forums even automatically convert them)
Anyways I have had the code for outputting screenshots in PNG for a while, it's just a matter of figuring out how to tie up all the required libraries to OpenXcom. I mean have you looked at the PNG website (https://www.libpng.org/pub/png/)? It's like something out of the 80s! :P
-
;D
-
And once the required libraries are linked into openxcom (I thought it was only zlib and libpng?) then it's only a small step to load sprites from PNG 8)
-
Small step for developer, a giant leap for modders :)
-
Daiky, there is an alternative to libpng, without any dll/so and zlib... https://lodev.org/lodepng/
-
+1 ;D
-
Doesn't UFO2000 use PNG ? Will Openxcom be compatible with Ufo2000 Items ? What Program do they use to save it all ( someone here must of used UFO2000 before )?
-
LodePNG library work like a charm. Just tested it.
-
LodePNG library work like a charm. Just tested it.
Interesting, the developer seems to be from Belgium even :) But I don't know him :p
-
It's quite easy to use. The only thing I was puzzled with is... getting png info on alpha channel before loading, in order to load in in proper form - RGB or RGBA. Of course it was solved.
-
I've added PNG functionality into my dead project (https://volutar.eu5.org/bd.zip). Textures are in PNG, and screenshots are in PNG as well. With quite an ease...
-
Daiky, there is an alternative to libpng, without any dll/so and zlib... https://lodev.org/lodepng/
Wow that was surprisingly handy, I implemented PNG screenshots with just a few lines. :)
And once the required libraries are linked into openxcom (I thought it was only zlib and libpng?) then it's only a small step to load sprites from PNG 8)
Loading the graphics into OpenXcom isn't the hard part (SDL_image can do loading fine, it just can't save for some reason), it's just externalizing all the resource loading stuff, and you saw how long that took just for the ruleset. :P