[Win8] Image saved by CCRenderTexture is deformed

Hi, first time here, hello guys and girls!

Well, I’m drawing a sprite to a CCRenderTexture using this code:

picsRender~~>beginWithClear;
bgList[0]>visit;
picsRender
>end;
It’s showing fine at the screen of application, so I want to save the image from this CCRenderTexture to a file using this:
char* tempStr = new char[50];
sprintf;
picsRender~~>saveBuffer(kCCImageFormatPNG, tempStr);

It’s saving, ok… but it’s deformed, I see that it’s a problem inside getUIImageFromBuffer, but I have no idea how can I solve this.


image123456.png (216.5 KB)


1.png (190.6 KB)


1.png (190.6 KB)

Paulo Feodrippe wrote:

Hi, first time here, hello guys and girls!
>
Well, I’m drawing a sprite to a CCRenderTexture using this code:
>
picsRender~~>beginWithClear;
bgList[0]>visit;
picsRender
>end;
>
It’s showing fine at the screen of application, so I want to save the image from this CCRenderTexture to a file using this:
>
char* tempStr = new char[50];
sprintf;
picsRender~~>saveBuffer(kCCImageFormatPNG, tempStr);
>
It’s saving, ok… but it’s deformed, I see that it’s a problem inside getUIImageFromBuffer, but I have no idea how can I solve this.
>

Having exactly the same problem (Windows 8). Anyone?

Evgeni Aizikovich wrote:

Paulo Feodrippe wrote:
> Hi, first time here, hello guys and girls!
>
> Well, I’m drawing a sprite to a CCRenderTexture using this code:
>
> picsRender~~>beginWithClear;
> bgList[0]>visit;
> picsRender
>end;
>
> It’s showing fine at the screen of application, so I want to save the image from this CCRenderTexture to a file using this:
>
> char* tempStr = new char[50];
> sprintf;
> picsRender~~>saveBuffer(kCCImageFormatPNG, tempStr);
>
> It’s saving, ok… but it’s deformed, I see that it’s a problem inside getUIImageFromBuffer, but I have no idea how can I solve this.
>
>
>
>
Having exactly the same problem (Windows 8). Anyone?

OK, I been investigated this issue a little bit more, and it seems to be related to the size of rendering texture. If I using the size of the screen (1366x768) it produces deformed image, but if I using smaller size, such as 1340x760 - it looks fine.