display.captureScreen( saveToAlbum ) and config.lua "letterbox"

Hi,
Is there any way to capture screen in scale "letterbox" mode and keep the image in high resolution?
For example, when I set scale mode in config.lua like this:

1
2
3
4
5
6
7
8
9
10
11
-- config.lua
 
application =
{
        content =
        {
                width = 320,
                height = 480,
                scale = "letterbox"
        },
}

I have same problem.. if I capture iPhone sized picture everything is OK(except bad orientation) but if I capture same picture on iPad picture is cropped.. I think that's big bug..
can anyone fix it?

function vytvorTlacitka()
	local info_btn=movieclip.newAnim{"info1.png","info2.png"};
	info_btn:setReferencePoint(display.TopLeftReferencePoint);
	info_btn.x=12;
	info_btn.y=10;
	buttGroup:insert(info_btn);
	local tabule_btn=movieclip.newAnim{"zmenaTabule1.png","zmenaTabule2.png"};
	tabule_btn:setReferencePoint(display.TopLeftReferencePoint);
	tabule_btn.x=965;
	tabule_btn.y=9;
	buttGroup:insert(tabule_btn);
	local foto_btn=movieclip.newAnim{"foto1.png","foto2.png"};
	foto_btn:setReferencePoint(display.TopLeftReferencePoint);
	foto_btn.x=965;
	foto_btn.y=485;
	buttGroup:insert(foto_btn);
	
	buttGroup[1]:addEventListener("touch",buttInfoTouch);
	buttGroup[2]:addEventListener("touch",buttTabuleTouch);
	buttGroup[3]:addEventListener("touch",buttFotoTouch);
end
function vytvorPozadi()
	local prvek = display.newImage("background"..indexPozadi..".png");
	--local prvek = display.newImage("zmenaTabule1.png");
	prvek:setReferencePoint(display.TopLeftReferencePoint);
	prvek.x=0;
	prvek.y=0;
	prvek.rotation=0;
	pozadi:insert(prvek);
	
	local lista_mc=display.newImage('lista.png');
	lista_mc:setReferencePoint(display.TopLeftReferencePoint);
	lista_mc.x=0;
	lista_mc.y=536;
	listaGroup:insert(lista_mc);
end
function zmenaTabule()
	if(indexPozadi

application={
	content={
		width=1024,
		height=768,--576
		--scale="zoomStretch"
		scale="none"
	},
}

thx

I'm assuming the content= width and height code is in the config.lua file.

The reason the picture is chopped is because you are trying to scale the iPad 768 x 1024 screen to 1024 x 768. It's not stated well in our documentation but you should only set the width and height values when you target the app for multiple size screens (e.g., iPhone and iPad). If your app is designed only to run on the iPad, you don't need to specify the width and height. If you specify these values, they need to be the values of the device in portrait mode, even if you want your app to run in landscape mode. To make it work in landscape mode you set the orientation in the build.settings file.

-Tom

Hello,
unfortunately it doesn't work.. I tried delete cofig.lua file but this bug remains.. even if I set default orientation to portrait saved image is cropped.
I upload my project here:
http://leteckaposta.cz/194556131
please try to download it and help please(screenshot you take by clicking to camera button in the app)..
I'am really desperate of this bug

Edit:
I tried download Corona beta 8, and there is all OK, except bad orientation(I have landscape mode, but snap is oriented like portrait). Is there any way how to snap picture to right rotation?
thx

Thanks for the test code. I verified that it's a problem in the SDK and assigned it bug #928. It seems the image capture is not using the device orientation when it saves the image.

-Tom

Was there ever a solution pushed out for this? I tried to use this feature today but noticed that although it works great on the simulator it is snapping a portrait image although my app is in landscape mode.

Ditto - this needs a solution... ??

(Just to be more specific -- the app is in landscape mode and the screen capture is in portrait.)

Guys any news on this issue???

same problem here ... I was trying to rotate image after capture but it doesn't work.
any news ?

Hi,

I have same problem. Any solution to it, I have an application and only need to solve capture in landscape.

A bunch of screen capture bugs have been fixed on the daily build.

C.

I test with daily build 526, and have same problem.

I force ipad size and landscape orientation and screen capture is in portait.

Thanks.

David.

Daily build 584 - still the same bug. Is here any chance to know the date the bug will be fixed? Our projects can't be released because of this.

I have same problem, application can not be released for this bug.

New version (build 591) - display.captureScreen WORKS! Unfurtunately display.save does not :( ...

views:2388 update:2011/9/17 18:17:57
corona forums © 2003-2011