![]() ![]() PictureBox1.SizeMode = PictureBoxSizeMode. Susan Harkins shows you how to do it correctly. Using (Graphics g = Graphics.FromImage(pictureBox1.Image)) //start redaction on May 10, 2022, 11:03 AM PDT Microsoft Word doesn’t have a dedicated redact tool, but you can still remove sensitive data from your Word files. 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 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. The meaning of REDACT is to put in writing : frame. And completly displays the the picture box in all black nothing of the original image. If you have a paper copy then there is no way to reveal the blacked out portions of the document. So i had to read it in to bit format, but when i display the box it resizes the box wierd. Load the digital copy of the redacted document into an image processing program like Photoshop or GIMP. This is a little more tricky since you are modifying an image or photo of a file. 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. A common error in redacting information is to use the wrong method to. 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. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |