question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dlemstracommented, Feb 27, 2018

@paulcreo I can reproduce the issue and I will need to investigate why this has changed.

0reactions
dittodholecommented, Jan 31, 2020

see #214, should have been fixed with 7.4.6 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

[RESOLVED] Save image loaded in picturebox as PCX...
Re: Save image loaded in picturebox as PCX... basically, it does what i need.... but i need to make MY APP convert the...
Read more >
Image (PCX) for EPL2 Zebra printer
I have a 1 bit file which I try to upload with the following script.. setppi.txt. GK"NAMEPCX" GK"NAMEPCX" GM"NAMEPCX"3042. and then upload with...
Read more >
Convert your PNG to PCX for Free Online
Do you want to convert a PNG file to a PCX file ? Don't download software - use Zamzar to convert it for...
Read more >
Question - Read File (img) Binary
Each byte has 8 bits, of course, and each bit represents one graphic dot. In the binary data, a 1 = white dot...
Read more >
Problems with png
The game now crashes with the following error message: ... p.s.: that is, convert 24-bit png back to paletted one won't work as...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found