Skip to content

Convert 8 bit PNG to 1 bit PCX fails since v7.3 #173

@paulcreo

Description

@paulcreo

Since version 7.3 it seems 1 bit PCX conversion is broken. The resulting file is always 24 bit.
With version 7.2.10 and below this code works as expected:


public static Stream ToMonochrome(this Bitmap bitmap, int width, int height, int degrees)
        {

            var stream = new MemoryStream();
            using (var img = new MagickImage(bitmap))
            {

                img.Resize(width, height);
                img.Rotate(degrees);

                img.Depth = 1;
                img.Format = MagickFormat.Pcx;
                img.ColorType = ColorType.Bilevel;

                img.Write(stream);
               
            }

            stream.Position = 0;
            return stream;

        }

Am I missing something that changed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions