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:

-- config.lua  
  
application =  
{  
 content =  
 {  
 width = 320,  
 height = 480,  
 scale = "letterbox"  
 },  
}  

It worked really well. I can create one App and target it to both iPhone and iPad platform.

When I use captureScreen function in iPhone, I can get a 320x480 image.
However, if I do it in iPad, I would only get a 384x512 image.

I know it is due to scale mode, but I would like to use this function for wallpaper App.
Therefore, is there any way to get a 768x1024 image? [import]uid: 4992 topic_id: 1306 reply_id: 301306[/import]

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<maxpozadi> indexPozadi=indexPozadi+1;<br>	else<br> indexPozadi=1;<br>	end<br>	local prvek = display.newImage("background"..indexPozadi..".png");<br>	prvek:setReferencePoint(display.TopLeftReferencePoint);<br>	prvek.x=0;<br>	prvek.y=0;<br>	pozadi:insert(prvek);<br>	pozadi[1]:removeSelf();<br>end<br>function udelejFoto()<br>	local image=display.captureScreen(true);<br>	image:removeSelf();<br>end<br>function buttInfoTouch(event)<br>	local t = event.target;<br>	local phase = event.phase;<br>	if "began" == phase then<br> -- Make target the top-most object<br> t.isFocus = true;<br> t:stopAtFrame(2);<br>	elseif t.isFocus then<br> if "ended" == phase or "cancelled" == phase then<br> t.isFocus = false;<br> t:stopAtFrame(1);<br> if phase=="ended" then<br> --prekryje menu a vytvori info<br> end<br> end<br>	end<br>end<br>function buttTabuleTouch(event)<br>	local t = event.target;<br>	local phase = event.phase;<br>	if "began" == phase then<br> -- Make target the top-most object<br> t.isFocus = true;<br> t:stopAtFrame(2);<br>	elseif t.isFocus then<br> if "ended" == phase or "cancelled" == phase then<br> t.isFocus = false;<br> t:stopAtFrame(1);<br> if phase=="ended" then<br> zmenaTabule();<br> end<br> end<br>	end<br>end<br>function buttFotoTouch(event)<br>	local t = event.target;<br>	local phase = event.phase;<br>	if "began" == phase then<br> -- Make target the top-most object<br> t.isFocus = true;<br> t:stopAtFrame(2);<br>	elseif t.isFocus then<br> if "ended" == phase or "cancelled" == phase then<br> t.isFocus = false;<br> t:stopAtFrame(1);<br> if phase=="ended" then<br> udelejFoto()<br> end<br> end<br>	end<br>end<br>function mainMenuLinkTouch(event)<br>	local t = event.target;<br>	local phase = event.phase;<br>	if "began" == phase then<br> -- Make target the top-most object<br> t.isFocus = true;<br> t:stopAtFrame(2);<br>	elseif t.isFocus then<br> if "ended" == phase or "cancelled" == phase then<br> t:stopAtFrame(1);<br> t.isFocus = false;<br> if phase=="ended" then<br> system.openURL("http://itunes.apple.com/us/artist/cfc-s-r-o/id384179195");<br> end<br> end<br>	end<br>end<br><br>-- ******** <br>function main()<br>	vytvorTlacitka();<br>	vytvorPozadi();<br>end<br>--spustime program<br>main()</maxpozadi>




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

thx [import]uid: 6869 topic_id: 1306 reply_id: 5654[/import]

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 [import]uid: 7559 topic_id: 1306 reply_id: 5659[/import]

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 [import]uid: 6869 topic_id: 1306 reply_id: 5667[/import]

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 [import]uid: 7559 topic_id: 1306 reply_id: 5682[/import]

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. [import]uid: 10747 topic_id: 1306 reply_id: 11376[/import]

Ditto - this needs a solution… ?? [import]uid: 13859 topic_id: 1306 reply_id: 19189[/import]

(Just to be more specific – the app is in landscape mode and the screen capture is in portrait.) [import]uid: 13859 topic_id: 1306 reply_id: 19194[/import]

Guys any news on this issue??? [import]uid: 11459 topic_id: 1306 reply_id: 26178[/import]

same problem here … I was trying to rotate image after capture but it doesn’t work.
any news ? [import]uid: 13156 topic_id: 1306 reply_id: 28089[/import]

Hi,

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

[import]uid: 44539 topic_id: 1306 reply_id: 39214[/import]

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

C. [import]uid: 24 topic_id: 1306 reply_id: 39220[/import]

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. [import]uid: 44539 topic_id: 1306 reply_id: 39290[/import]

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. [import]uid: 38630 topic_id: 1306 reply_id: 46798[/import]

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

[import]uid: 44539 topic_id: 1306 reply_id: 46800[/import]

New version (build 591) - display.captureScreen WORKS! Unfurtunately display.save does not :frowning: … [import]uid: 38630 topic_id: 1306 reply_id: 48575[/import]