Convert 8 bit PNG to 1 bit PCX fails since v7.3
See original GitHub issueSince 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:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@paulcreo I can reproduce the issue and I will need to investigate why this has changed.
see #214, should have been fixed with 7.4.6 😃