8000 sw_engine: pixel loss at the first line · Issue #3512 · thorvg/thorvg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
sw_engine: pixel loss at the first line #3512
Open
@hermet

Description

@hermet

The first line is lost after rotation 90:

Result:
Image

Expected:
Image

    bool content(tvg::Canvas* canvas, uint32_t w, uint32_t h) override
    {
        if (!canvas) return false;

        //Open file manually
        ifstream file(EXAMPLE_DIR"/image/test.png", ios::binary);
        if (!file.is_open()) return false;
        auto begin = file.tellg();
        file.seekg(0, std::ios::end);
        auto size = file.tellg() - begin;
        auto data = (char*)malloc(size);
        file.seekg(0, std::ios::beg);
        file.read(data, size);
        file.close();

        auto picture = tvg::Picture::gen();
        if (!tvgexam::verify(picture->load(data, size, "png", "", true))) return false;
        free(data);
        picture->translate(600, 0);
        picture->rotate(90);
        canvas->push(picture);

        return true;
    }

Sample Image:
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    cpuSoftware render backendenhancementImprove features

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0