Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: LUniqueDan on Tue 12/02/2008 01:39:57

Title: Screenshots from savegames - resizing problems
Post by: LUniqueDan on Tue 12/02/2008 01:39:57
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
************************************************************************


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
Title: Re: Screenshots from savegames - resizing problems
Post by: Khris on Tue 12/02/2008 02:52:30
I've never worked with savegame screens, but you could try this:


Vanessa = DynamicSprite.CreateFromSaveGame(Slot,320,240);  // note the 240
Vanessa.Crop(0,20,320,200);                        // cut away letterbox borders
gUi_320x200.BackgroundGraphic = Vanessa.Graphic;
Title: Re: Screenshots from savegames - resizing problems
Post by: LUniqueDan on Tue 12/02/2008 04:23:52
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 ):

(http://i175.photobucket.com/albums/w128/danthedanuniquely/saveload.jpg)

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...



Title: Re: Screenshots from savegames - resizing problems
Post by: GarageGothic on Tue 12/02/2008 10:10:26
Did you set game.screenshot_height and game.screenshot_width to 320x200? Default is 160x100.
Title: Re: Screenshots from savegames - resizing problems
Post by: LUniqueDan on Tue 12/02/2008 11:56:42
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!
Title: Re: Screenshots from savegames - resizing problems
Post by: .M.M. on Tue 12/02/2008 14:25:02
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?