Sprite transforms texture even if scale factor 1.0

I draw primitive (rectangle with rounded corners 50x50 px) to memory, created Texture2D from raw pixels, and created Sprite from Texture2D, on the IOS screen rectangle is 53 pixels (scale factor 1.0) and pixels near borders changed alpha (please see screenshot).

So the question is why that transformation happens, and how to disable it?

Texture2D* tex = new (std::nothrow) Texture2D();
tex->initWithData( bitmap.getPixels(), widthheight4, Texture2D::PixelFormat::RGBA8888, width, height, Size() );

    auto tempFactor = Director::getInstance()->getContentScaleFactor();
    Director::getInstance()->setContentScaleFactor( 1.0f );
    
    Sprite* test = Sprite::createWithTexture( tex );
    test->setBlendFunc( BlendFunc::ALPHA_PREMULTIPLIED );
    test->setPosition( getCenterPosition().x, getCenterPosition().y + 100.0f );
    addChild( test, 5555 );
    
    Director::getInstance()->setContentScaleFactor( tempFactor );

What is your design resolution and resolution policy. The engine is probably scaling up the entire GL surface based on those causing your issues.

Thanks a lot!
My design resolution is 720x1280 and resolution policy is FIXED_WIDTH.

I tried to change design resolution to 750x1334 as iPhone 6 Simulator has. So the problem with scaling gone, but still I have first and last row affected, please see screenshot:

Ah, the iPhone 6(s) and 6(s) plus by default aren’t 1:1 pixel resolution instead they internally scale up/down the image depending on the device and display settings. I probably wouldn’t worry about this if it looks fine on the device itself (simulator is not representative of real-world). If you care you can search on how to force the GPU to render the GL surface out at exact device pixel resolution.