Simon Brown Posted December 31, 2007 Share Posted December 31, 2007 I know this is a very basic question - but how can I access the individual pixels of the "Document" class? Quote Link to comment Share on other sites More sharing options...
pyrochild Posted December 31, 2007 Share Posted December 31, 2007 If you don't need access to individual layers : document.Render() If you do: document.Layers.GetAt().Render()\ EDIT: I think... haven't tested, and there might be a simpler way... EDIT2: Yup, Rick posted a simpler way Quote 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...
Rick Brewster Posted December 31, 2007 Share Posted December 31, 2007 Technically speaking, a Document does not have pixels. A Document has Layers. A Layer has a Surface. The Surface has the pixels (ColorBgra). void Manipulate(Document d) { d.Layers[0].Surface[x, y] = something; } (assuming 'd' is a Document that has had at least one BitmapLayer added to it) Quote 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...
Simon Brown Posted January 1, 2008 Author Share Posted January 1, 2008 Thanks for your help. Here is my plugin: http://paintdotnet.forumer.com/viewtopic.php?f=16&t=21917 Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted January 1, 2008 Author Share Posted January 1, 2008 I now know an even easier way: Document.FromImage(); Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted January 4, 2008 Author Share Posted January 4, 2008 I have another question - how can you access pixel data when exporting? Quote Link to comment Share on other sites More sharing options...
Simon Brown Posted January 4, 2008 Author Share Posted January 4, 2008 Solution Found Quote 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.