12 posts / 0 new
Last post
Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:
maCreateImageRaw problem

Hi,

maCreateImageRaw is not working on Motorola Xoom (HC 3.0.1) and MoSync 2.7.

When using transparent = false, color channels are inverted.
When using transparent = true, image is mixed w/ last canvas used and color channels are inverted.

Everything is ok on Froyo 2.2 and GB 2.3.
MoSync 2.6 is ok on all versions, including 3.0.1.

Regards,

Diego

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Hi Diego, I'll speak to the Android runtime team about this tomorrow morning.

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi,

I found the same problem using MoRE.exe + TeamViewer (Yes, I was remotely showing a feature to a customer).

So the problem is probably in RGB888 -> RGB555 convertion.

Diego

Mikael Kindborg
miki's picture
Offline
Mobile Wizard
Joined: 29 Jun 2010
Posts:

Hi Diego,
I have opened an issue for the problem: http://jira.mosync.com/browse/MOSYNC-1412
Thanks for reporting!
Mikael

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi,

Do you think this issue is going to be solved in 3.0 ? Do you have a workaround?

Diego

Mikael Kindborg
miki's picture
Offline
Mobile Wizard
Joined: 29 Jun 2010
Posts:

Sorry, no I don't think that has been fixed. Will talk to the dev team about the status of the issue.
Best, Micke

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Micke,

is it possible to get a data handle instead of image handle from an image resource. If so, I could embed my own png decoder to workaround maCreateImage problem.

Diego

Sam Pickard
rival's picture
Offline
Mobile Archmage
Joined: 19 Mar 2009
Posts:

Hi, if the image is added to the project as a binary resource (.bin) instead of an image (.image), then the resource will be the undecoded data. Also, if you download the image data without using the ImageDownloader class, then the data handle will be the undecoded data.

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Sam,

I was afraid that was the only solution.

Regards,

Diego

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Mike,

I've implemented the workaround using lodepng + Gfx_Plot, but it's really slow. I'm creating buffers of raw images, but it's really hard to use w/o the createimagefromraw. Any chance in correcting to the next release?

Diego

Mikael Kindborg
miki's picture
Offline
Mobile Wizard
Joined: 29 Jun 2010
Posts:

Hi Diego,
We should definetely go for fixing that. Will talk to the other in the dev team to see what can be done.
Best, Micke

Diego Velazquez
diegolv's picture
Offline
Mobile Wizard
Joined: 4 Oct 2010
Posts:

Hi Micke/Florin,

Good job!

Last NB (2012-03-29) corrects RGBA channels in maCreateImageRaw, but it only works with opaque images. I guess there's a problem w/ maDrawImage. Attached what I expect and what I have. The transparent part is not merging w/ current background, but with some buffer or so.

Regards,

Diego

maDrawImage.jpg