2 years ago

#33456

test-img

mod Zz

ID2D1RenderTarget::FillOpacityMask render with low resolution

here i got some images i rendered with ID2D1RenderTarget::FillOpacityMask (i actuall call this funtion with a ID2D1DeviceContext2 pointer but it reference to ID2D1RenderTarget interface...).

enter image description here cicle

So i'm not happy of the rendering quality. The original image has perfect resolution and is much bigger than the limit rectangle i render it into.

d2d_device_context->CreateBitmapFromWicBitmap(
     wicConverter,
     NULL,
     &bitmap
);

d2d_device_context->SetAntialiasMode(D2D1_ANTIALIAS_MODE_ALIASED);
d2d_device_context->FillOpacityMask(
    myBitmap,
    myBrushMask,
    D2D1_OPACITY_MASK_CONTENT_GRAPHICS,
    limitRect,
    renderRect
);
d2d_device_context->SetAntialiasMode(D2D1_ANTIALIAS_MODE_PER_PRIMITIVE);

This is the code i use. It not take any agument to select D2D1_INTERPOLATION_MODE like DrawBitmap or DrawImage does.

How can i increase the rendering quality?

direct2d

opacitymask

0 Answers

Your Answer

Accepted video resources