display.save still not working correctly?

Hey there,

I'm using display.save to save down a simple screenshot of a display object or the stage.currentDisplay.

The Win-Simulator seems to save down the image incorrectly - the resulting image is always 0.5x the size of its natural size.

As shown in the lua-example below, I'm simply creating a red rectangle over the whole screen, saving the stage.currentDisplay down, removing the original rectangle and then loading the saved image.

I would expect the image to be the same size as it was pre-saving...
Does this happen on the mac version as well? Can anyone confirm?

See link for screenshot:
http://imageshack.us/photo/my-images/839/errorimage.jpg/

Notice:
-Using Daily Build 649, Win/Android version
- Using large screen (resolution is high: 1920x1080)
- This errors happens both when zoomed in or zoomed out in the simulator
- I do not have any special configuration settings for dynamic scaling

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--create rect
local rect = display.newRect(0, 0, display.contentWidth, display.contentHeight)
rect:setFillColor(255, 1, 1, 255);
 
local baseDir = system.DocumentsDirectory
local fileName = "entireScreen.jpg";
 
--save
display.save( display.currentStage, fileName, baseDir )
 
--remove rect
rect:removeSelf()
 
-- load saved image
local image = display.newImage(fileName, baseDir)

Do you get the desired results by using display.newImageRect()? (where you specify widht/height).

e.g.
local image = display.newImageRect( fileName, baseDir, 1920, 1080 )

Also, a way to verify this is to go to File > Show Project Sandbox and look in the Documents Directory to see if the saved image is the correct resolution.

Thanks.. but the problem persists even if I do so.

So if I specify the rectangle to be 100x100 and use display.save on it instead of the stage, the resulting image is 50x50.

i had read it some time ago if image in android is larger than 1024x1024 corona will re size that automatically and this issue has been fixed in new build can u try it with last build.

i think it is a your problem due to very high width and height

:)

be my friend ?

http://www.facebook.com/hgvyas123

Thanks friend ;) but since this happens with small rectangles as well it can't just be a matter of size of a image.

Tried this with build 696 as well, same issue..

views:1534 update:2011/12/1 20:56:45
corona forums © 2003-2011