Toli Posted September 16, 2010 Share Posted September 16, 2010 False. The Clipboard does contain an image. It is a png and it can be safely pasted into Word or Excel using "Paste Special". It can't be pasted in mspaint though. Link to comment Share on other sites More sharing options...
pyrochild Posted September 16, 2010 Share Posted September 16, 2010 If it's not working in Paint.NET or MSPaint, but it works in Word and Excel, you might have some Office proprietary data in the clipboard, not a regular bitmap image. Or maybe you copied the image file instead of the image. This is not the same thing. ambigram signature by Kemaru [i write plugins and stuff] If you like a post, upvote it! Link to comment Share on other sites More sharing options...
Toli Posted September 16, 2010 Author Share Posted September 16, 2010 It is not the file, it is a png image. I know the difference. I copy it using .net. Clipboard.SetData("PNG", image); image is a standard 32bpp png which opens fine in Paint.NET and renders fine in .net Windows.Forms. Clipboard.SetImage(image); does the job, but the image loses its transparency when pasted, so it's of no use. So, why does Paint.NET not recognize the "PNG" Clipboard format? Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 16, 2010 Share Posted September 16, 2010 http://forums.getpaint.net/index.php?/topic/19459-bug-copy-paste-problem/page__view__findpost__p__330306 (just a suggestion) Â ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
himself22 Posted September 17, 2010 Share Posted September 17, 2010 EER: Your link doesn't go anywhere. "The truth is just an excuse for having a lack of imagination." Photobucket sucks! Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 17, 2010 Share Posted September 17, 2010 How wierd. I used the usual right click on the post number. Odd. I meant to link to Rick's post in this thread: Clicky  ebook: Mastering Paint.NET | resources: Plugin Index | Stereogram Tut | proud supporter of Codelab plugins: EER's Plugin Pack | Planetoid | StickMan | WhichSymbol+ | Dr Scott's Markup Renderer | CSV Filetype | dwarf horde plugins: Plugin Browser | ShapeMaker Link to comment Share on other sites More sharing options...
Rick Brewster Posted September 17, 2010 Share Posted September 17, 2010 Actually Paint.NET is intentionally lying to you. I needed a way to get more people to sign up for the forum so I made it randomly bomb out on copy/paste ... Just kidding. It's not lying to you. Like I said elsewhere, the clipboard is a shared resource, it's cantankerous, and it's not very smart. Setting the type to "PNG" doesn't mean anything, you're using the wrong tag there. The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Toli Posted September 17, 2010 Author Share Posted September 17, 2010 But it actualy is a PNG and Word sees it as a valid PNG... so the tag is not wrong Link to comment Share on other sites More sharing options...
gregdosborne Posted July 7, 2011 Share Posted July 7, 2011 (edited) It is not the file, it is a png image. I know the difference. I copy it using .net. Clipboard.SetData("PNG", image); image is a standard 32bpp png which opens fine in Paint.NET and renders fine in .net Windows.Forms. Clipboard.SetImage(image); does the job, but the image loses its transparency when pasted, so it's of no use. So, why does Paint.NET not recognize the "PNG" Clipboard format? To properly paste a PNG image to the clipboard, do the following using (MemoryStream stream = new MemoryStream()) { _Bitmap.Save(stream, ImageFormat.Png); var data = new DataObject("PNG", stream); Clipboard.Clear(); Clipboard.SetDataObject(data, true); } This should take care of your problems. Edited July 7, 2011 by gregdosborne Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 7, 2011 Share Posted July 7, 2011 gregdosborne, newer versions of Paint.NET already do this. Using Reflector, look at PaintDotNet.exe, in the PaintDotNet.ClipboardUtil class, in the GetClipboardImageAsSurface() method. The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
pdnnoob Posted July 7, 2011 Share Posted July 7, 2011 I kinda feel like a noob saying something that doesn't involve arguing with strings of code, but when I get an error message like that and I can only paste into a word processor, it is usually because I highlighted the image, then copied it. From a non-programmer perspective (and I feel silly saying this), the computer thinks I copied a piece of text and I'm trying to paste it as an image. To solve the problem, I go back, un-highlight the image, and copy by right clicking and pressing the "copy image" button. Not sure if this is the same issue, but it sure sounds like it is. No, Paint.NET is not spyware...but, installing it is an IQ test. ~BoltBait Blend modes are like the filling in your sandwich. It's the filling that can change your experience of the sandwich. ~Ego Eram Reputo Link to comment Share on other sites More sharing options...
Rick Brewster Posted July 8, 2011 Share Posted July 8, 2011 Well this conversation is going on elsewhere and this thread is really old anyway, I'm going to close the thread. The Paint.NET Blog: https://blog.getpaint.net/ Donations are always appreciated! https://www.getpaint.net/donate.html Link to comment Share on other sites More sharing options...
Recommended Posts