buzzy Posted May 21, 2008 Share Posted May 21, 2008 I am pleased with the additions to the output file formats that occurred recently. This provided a monochrome, 8 bit per pixel format. I have a need for a monochrome, 1 bit per pixel format. It would be nice to be able to set the threshold for conversion from 8 bits to one bit. Currently I have to save the file from Paint.net and then open it in MS Paint to do the final conversion and I have no threshold control. Quote Link to comment Share on other sites More sharing options...
BoltBait Posted May 21, 2008 Share Posted May 21, 2008 Here is a CodeLab script for the conversion you need: #region UICode int Amount1 = 128; // [0,255] Tolerance #endregion private UnaryPixelOps.Desaturate desaturateOp = new UnaryPixelOps.Desaturate(); void Render(Surface dst, Surface src, Rectangle rect) { ColorBgra CurrentPixel; for (int y = rect.Top; y { for (int x = rect.Left; x { CurrentPixel = desaturateOp.Apply(src[x,y]); if (CurrentPixel.R > Amount1) { CurrentPixel = ColorBgra.Black; } else { CurrentPixel = ColorBgra.White; } dst[x,y] = CurrentPixel; } } } It can be found on this page: http://www.boltbait.com/pdn/codelab/hel ... ments.html as part of the CodeLab help file. You'll still need to use MS Paint for the final save as Paint.NET does not support 1 bit output formats. EDIT: Download this plugin pack: viewtopic.php?f=16&t=23885 for better conversions to 1 bit. Quote Click to play: Download: BoltBait's Plugin Pack | CodeLab | and how about a Computer Dominos Game Link to comment Share on other sites More sharing options...
barkbark00 Posted May 21, 2008 Share Posted May 21, 2008 I know this doesn't solve your "1-bit output problem", but you could just use Brightness/Contrast with the Contrast set to 100; this leaves the Brightness control to be used as a makeshift "threshold"... Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
MiguelPereira Posted May 22, 2008 Share Posted May 22, 2008 Ed-harvey as a plugin called Threshold.... Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
Simon Brown Posted May 22, 2008 Share Posted May 22, 2008 Ed-harvey as a plugin called Threshold.... That sounds like a section of a wikipedia article. I believe you mean has. Quote Link to comment Share on other sites More sharing options...
barkbark00 Posted May 22, 2008 Share Posted May 22, 2008 Ed-harvey as a plugin called Threshold.... lol...Forgot about that. Quote Take responsibility for your own intelligence. -Rick Brewster Link to comment Share on other sites More sharing options...
MiguelPereira Posted May 22, 2008 Share Posted May 22, 2008 Ed-harvey as a plugin called Threshold.... That sounds like a section of a wikipedia article. I believe you mean has. lol my 'h' wasn't working Quote [The stock on my sig is a photo I took not a render from Splatter] [My deviantART][My Gallery][My Space] Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.