Skip to content

BW BitmapToPixConverter conversion inverts color blanks out right side of image #72

Open
@npbenjohnson

Description

@npbenjohnson

I got these results using phototest.tif from the console example project.

Code:

                    var converter = new BitmapToPixConverter();
                    foreach (var rect in splitResults.Regions)
                    {
                        using (var cloneBmp = bmp.Clone(rect, bmp.PixelFormat))
                        {
                            pixList.Add(converter.Convert(cloneBmp));
                        }
                    }

After converter.Convert() on "phototest.tif":
pix1
Made by saving the cloned bitmap before converting to pix:
Rectangle from main image: {X = 36 Y = 92 Width = 582 Height = 92}
PixelFormat passed by bmp.PixelFormat: Format1bppIndexed
original2
Cloned bitmap after converting to pix, note that it is the same size as the above image, it has a white area on the right:
pix2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions