Screenshots from savegames - resizing problems

Started by LUniqueDan, Tue 12/02/2008 01:39:57

Previous topic - Next topic

LUniqueDan

Hey guys :
Is there a reason why a savegame-screenshot resized at 320x200 (i.e not suppose to be resized at all) appears resized anyway when set as background graphic of a 320x200 gui?

** Context : **************************************************************
-320x200, at 16bits,
-using letterbox (320x240) resolution (maybe the reason of the problem, hope not)
-Still on 2.72
************************************************************************

Code: ags

Vanessa = DynamicSprite.CreateFromSaveGame(Slot,320,200);
gUi_320x200.BackgroundGraphic = Vanessa.Graphic;
 

(I tried other values (320x201, 320x199, 320x240, 320x128 (the b/g size)) and the result is pretty the same. What I'm missing?

Is there a way to calculate the exact witdh/height  of the stored screenshots before grabbing them?
or
Is there a way to grab them with no automatic resizing?

Is the screenshots saved (EDIT: in SaveGame) have the exact same behaviors (sizes an others) than regular screenshots?
And / or,
Is there a way to access them without using DynamicSprite'Create from savegame'?
(EDIT 2 : Or did the olny way should be to overturn the problem by Saving/Loading manually Screenshots, which is not elegant?)
- Thanx
"I've... seen things you people wouldn't believe. Destroyed pigeon nests on the roof of the toolshed. I watched dead mice glitter in the dark, near the rain gutter trap.
All those moments... will be lost... in time, like tears... in... rain."

Khris

I've never worked with savegame screens, but you could try this:

Code: ags

Vanessa = DynamicSprite.CreateFromSaveGame(Slot,320,240);  // note the 240
Vanessa.Crop(0,20,320,200);                        // cut away letterbox borders
gUi_320x200.BackgroundGraphic = Vanessa.Graphic;

LUniqueDan

#2
The result is the same.  :'(

The screenshots saved in the savegames slots are not 240x320 either (EDIT : Or I really miss the point somewhere) , so it just take a chunk of an already resized sprite. With missing lines and disproportions....

(my Vanessa code was already part of a cropping algorithm), I isolated it through a Gui in order to understand what's going wrong with the SGame screenshot. (EDIT2 : Or at least find what's the 'natural size' of it.)

In theory it's suppose to give something like this (the picture in the paper ):



It's working fine with standard screenshots + DynSprite usual operations. It's just the 1:1 resizing that bugs it and I can't figure it out why exactly.

thanx anyway...



"I've... seen things you people wouldn't believe. Destroyed pigeon nests on the roof of the toolshed. I watched dead mice glitter in the dark, near the rain gutter trap.
All those moments... will be lost... in time, like tears... in... rain."

GarageGothic

Did you set game.screenshot_height and game.screenshot_width to 320x200? Default is 160x100.

LUniqueDan

Quote from: GarageGothic on Tue 12/02/2008 10:10:26
Did you set game.screenshot_height and game.screenshot_width to 320x200? Default is 160x100.

That's it!!!!!!!!!!
God you need to know those things.
Thanks a lot, man!
Everything work fine!
"I've... seen things you people wouldn't believe. Destroyed pigeon nests on the roof of the toolshed. I watched dead mice glitter in the dark, near the rain gutter trap.
All those moments... will be lost... in time, like tears... in... rain."

.M.M.

Hi,
I don't want to create new topic, so how could I have a window on Save game GUI with screenshot from saved game slots?

SMF spam blocked by CleanTalk