

Using (Graphics g = Graphics.FromImage(pictureBox1.Image)) //start redaction PictureBox1.Image = newImage //END Workaround for indexed pixels

String x1 = x1 = Regex.Match(l, y1 = y1 = Regex.Match(l, x2 = x2 = Regex.Match(l, y2 = y2 = Regex.Match(l, x3 = x3 = Regex.Match(l, 圓 = 圓 = Regex.Match(l, string to int for redacted pointsīitmap original = (Bitmap)(YOURFILE, true) If you're given the redacted starting points (obviously you have to make the Regex work to your situation): //Regex for pulling points from a file
#Image redacted code
Thanks to all the help from STO members!! heres the correct code for redacting images if you encounter the error "A Graphics object cannot be created from an image that has an indexed pixel format.". I believe i ran something about using a Bitmap from stream and then closing the stream. Whats going on with the code above, is once it's completed, all it displays is a blackbox with no original image. Then I need to display this redacted image (the original with the redaction) in a picturebox. So I have to change it to a Bitmap so I can actually draw a rectangle on it. Whats happening is I have a tif in a unsupported format. I'm not sure how I can make this clearer. G.FillRectangle(brush, new Rectangle(x1value, y1value, x3value, 圓value)) Using (SolidBrush brush = new SolidBrush(Color.Black)) Using (Graphics g = Graphics.FromImage(pictureBox1.Image)) Bitmap original = (Bitmap)(coveted, true) īitmap newImage = new Bitmap(original.Width, original.Height) if someone could help me where i'm going wrong that would be awesome. And completly displays the the picture box in all black nothing of the original image. So i had to read it in to bit format, but when i display the box it resizes the box wierd. So come on Join the community today (totally free - or sign in with your social account on the right) and join in the conversation. Sign in or join with: Only registered members can share their thoughts.
#Image redacted mod
I was helped with some code but i continously got the error: A Graphics object cannot be created from an image that has an indexed pixel format. Sprite Room image - redacted mod for Undertale. I have to load a tif and then show a blackbox over it. Whats going on is i need to draw a black rectangle over the image.
