Skip to content

Conversation

minggo
Copy link
Contributor

@minggo minggo commented Aug 8, 2019

  • Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
    Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
    Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
    Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
    Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
    Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

  • [CCImage-ios.mm] Fixed indentation.

  • [UISlider.cpp] Divide by 0 error if _maxPercent is equal to 0, which is an allowed value.

* Added RenderTexture::saveToFileAsNonPMA() to save images without PMA.
Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA.
Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public.
Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA.
Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file.
Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving.

* [CCImage-ios.mm] Fixed indentation.

* [UISlider.cpp] Divide by 0 error if _maxPercent is equal to 0, which is an allowed value.
@minggo minggo added this to the 4.0 milestone Aug 8, 2019
@minggo minggo merged commit b606f2a into cocos2d:v4 Aug 13, 2019
@minggo minggo deleted the syn-19957 branch October 8, 2019 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants