UziTech Posted September 9, 2013 Share Posted September 9, 2013 Here is what I need to do: 1. Open jpg picture 2. Select a square region 3. Crop to selection 4. Resize image to 100px X 100px 5. Save jpg I would like to create a plugin that will take care of steps 3 and 4 with one click I know c# very well and have downloaded and configured the plugin template for Visual Studios via this post: http://forums.getpaint.net/index.php?/topic/25828-help-needed-using-visual-studio-instead-of-codelab-for-developing/?p=384180 I'm not sure where to go from here. The pseudocode would look something like this: Get selection bounds Save pixels inside selection bounds to temp image Resize temp image to 100px X 100px return temp image If this can be done without creating a plugin that would be fine also. P.S. Is there documentation on the methods from the paint.net dlls? Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 9, 2013 Share Posted September 9, 2013 Plugins may not manipulate the selection region itself, and they operate entirely within any selection when manipulating pixels. Therefore a plugin may not 'crop to selection' as, by definition, the plugin cannot remove the pixels outside the selection. More >> http://forums.getpaint.net/index.php?/topic/14566-what-is-and-isnt-possible-when-writing-plugins/ Quote 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...
UziTech Posted September 10, 2013 Author Share Posted September 10, 2013 Is there some way to create a macro that will do this? Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted September 10, 2013 Share Posted September 10, 2013 Paint.NET doesn't do macros, but there are a handful of shortcuts you can use... 1. Make your selection using Rectangle Select + Shift to force the selection square. 2. Ctrl + C (Copy to clipboard) 3. Ctrl + Alt + V (Paste clipboard into new image) 4. Ctrl + R (Image > Resize) 5. Ctrl + S (Save) Quote 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...
UziTech Posted September 10, 2013 Author Share Posted September 10, 2013 That's pretty much what I have been doing. I was just hoping to make it a little bit easier. Is there a reason Paint.net doesn't do macros or has that feature just not been added yet? From what I've been reading a lot of people could use that feature. I love Paint.net but it looks like I will need to find another program to do this. Quote Link to comment Share on other sites More sharing options...
pdnnoob Posted September 10, 2013 Share Posted September 10, 2013 Or: 1. Make your selection using Rectangle Select + Shift to force the selection square. 2. Ctrl+Shift+X (crop to selection) 3. Ctrl+R (resize) 4. Ctrl+Shift+S (save as...) I think the bottleneck above is step 3 where you have to type in the size you want. If there was a way to customize presets kinda like sand33p's suggestion here (but in the resize window), that could streamline the process a bit. A one-click solution for this issue would be too specific to be beneficial to most people. Quote 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...
kowach Posted September 16, 2013 Share Posted September 16, 2013 This feature would be great as standard part of Paint.net. I have lot of images which I have to crop and resize to same size. Selection => Fixed Ratio => Saved Preset (eg. 700x300) => Crop&Resize (which would crop and downscale or upscale image to targeted size). 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.