media.save() converts png to jpg -> bug?

Hi Folks,

this snippet produce a jpg image in the device camera roll instead of the png (i miss all transparencies which i need)

local function capturePreview()  
 local baseDir = system.TemporaryDirectory  
 display.save( imageGroup, "myimage.png", baseDir )  
 media.save( "myimage.png", baseDir )  
end  

using daily 1011 the doc seems to allow saving png to camera roll, even display.capture() produce a jpg instead of a png.

Is this a bug, am i using the api in the wrong way or do i miss something? [import]uid: 104317 topic_id: 35239 reply_id: 335239[/import]

Another try, which had would solve my problem:

local function capturePreview()  
 local temp = display.capture(imageGroup,true )  
 temp:removeSelf()  
end  

but nothig the image saved into device camera roll is a jpg.

The strange thing is that in the docs for media.save() it is specified:


“Adds specified file to photo library.”

So i espected the file to be copied and not modified. Probably the png resulting from display.save() is a jpg instead? [import]uid: 104317 topic_id: 35239 reply_id: 140074[/import]

Hi @BuxPod,
What OS are you developing for? iOS, Android, or both? [import]uid: 200026 topic_id: 35239 reply_id: 140103[/import]

Hi Brent,
I’ve tested on iPad 2 up-to-date.
To be sure I’ve tried to open the saved image on psd express and no transparencies at all so I assume it is definitely a jpg. [import]uid: 104317 topic_id: 35239 reply_id: 140106[/import]

Hi @BuxPod,
I’m checking into this and I should have some answers for you shortly… just want to make sure I’ve explored all the angles before I write it out. Thanks for your patience!

Brent [import]uid: 200026 topic_id: 35239 reply_id: 140147[/import]

Hi Brent, i noticed that in the daily 1015 some changes occured in media.save and media.capture for Android/iOS do i have to expect the issue, if it is, is solved, i’ll try anyway and post here the result. [import]uid: 104317 topic_id: 35239 reply_id: 140600[/import]

Another try, which had would solve my problem:

local function capturePreview()  
 local temp = display.capture(imageGroup,true )  
 temp:removeSelf()  
end  

but nothig the image saved into device camera roll is a jpg.

The strange thing is that in the docs for media.save() it is specified:


“Adds specified file to photo library.”

So i espected the file to be copied and not modified. Probably the png resulting from display.save() is a jpg instead? [import]uid: 104317 topic_id: 35239 reply_id: 140074[/import]

Hi @BuxPod,
What OS are you developing for? iOS, Android, or both? [import]uid: 200026 topic_id: 35239 reply_id: 140103[/import]

Hi Brent,
I’ve tested on iPad 2 up-to-date.
To be sure I’ve tried to open the saved image on psd express and no transparencies at all so I assume it is definitely a jpg. [import]uid: 104317 topic_id: 35239 reply_id: 140106[/import]

Hi @BuxPod,
I’m checking into this and I should have some answers for you shortly… just want to make sure I’ve explored all the angles before I write it out. Thanks for your patience!

Brent [import]uid: 200026 topic_id: 35239 reply_id: 140147[/import]

Hi Brent, i noticed that in the daily 1015 some changes occured in media.save and media.capture for Android/iOS do i have to expect the issue, if it is, is solved, i’ll try anyway and post here the result. [import]uid: 104317 topic_id: 35239 reply_id: 140600[/import]