midora Posted May 16, 2015 Share Posted May 16, 2015 'Spirit Level' Photo Effect Plugin Summary This Paint.NET effect plugin allows you to rotate a layer using a virtual spirit level. If you need to rotate an image then flatten it first. The rotation is limited to the range +/- 45°. This restriction allows the plugin to distinguish between horizontal and vertical leveling automatically. Auto Scale modes allow you to define how the rotated layer will be scaled in the exiting image. Respect that the rotated image will be cropped to the current image dimension. Padding modes define how areas uncovered after the rotation will be filled up. Padding does not have any effect to the rotated area itself. So a transparent area in the image will stay transparent. If you need the rotated image in its rotated size (without scaling or cropping) then use the 'Copy' to clipboard command in the plugin, cancel the dialog, and execute Paint.NETs 'Paste into New Image' command. Or use 'Save As ...' to store the rotated image in a file. Keywords Straighten, Rotate, Spirit Level, Plumb Bob, Horizontal, Vertical, Horizon Author Martin Osieka Download >> SpiritLevel v1.0 (16.5.2015) Installation Follow the instructions carefully Unzip "SpiritLevel.Effect vX.X.zip" Copy the two files SpiritLevel.Effect.dll/.dlc to the Paint.NET\Effects\ folder .dll contains the module code .dlc contains the module configuration (like translated text) After a restart of Paint.NET you will find the plugin at Menu->Effects->Photo->Rotate using a spirit level... oder für deutsche Anwender unter Menu->Effekte->Foto->Rotieren mit Wasserwaage... Compatibility Paint.NET 3.5.11 and 4.0.5 Supported languages The language used in the plugin depends on the language setting of Paint.NET and the support of this language by the plugin. The fallback is the first supported language of the plugin. Languages are defined in the .dlc files. This plugin supports the following languages in the moment: English Deutsch русский (provided by ReMake) You may add your own translation to the .dlc file. Dialog options Choose the object in the image you like to align horizontal or vertical by drawing a line to the image. After releasing the mouse button the image will be rotated so that the line is horizontal or vertical in the main canvas. You may drag the start and end points of the line later to correct the position. If the angle of the line you have drawn is less than +/- 45 degrees compared to a horizontal line then a horizontal leveling will be done else a vertical one. Tip: The precision of the rotation depends on the length of the line. Longer is better in this case. Auto scaling modes: If you rotate an image then parts of the image will no longer be inside of the original image dimensions and other parts will be uncovered. A plugin can not change these dimensions but you can choose one of the auto scaling modes to define how the rotated image will fit into the original image. Scale In: Increases the size of the image so that there are no uncovered areas Off: No scaling Scale Out: Decreases the size of the image so that there are no parts outside. Padding modes: If there are uncovered areas after the rotation then the padding mode defines how these areas will be filled. Transparent Primary color Secondary color Keep: The uncovered areas show the pixels of the original unrotated image Mirror: Mirrors the rotated image at the borders. This provides the most natural effect on photos. The basic user interface of the canvas will be explained in an other message. Known issues None History 1.0 (16.5.2015) - First release 7 Quote Link to comment Share on other sites More sharing options...
midora Posted May 16, 2015 Author Share Posted May 16, 2015 (edited) Overview: Scaling and padding modes Starting image: Auto scale: Scale In; Padding Mode: Transparent and Mirror (no difference) Auto scale: Off; Padding Mode: Transparent and Mirror Auto scale: Scale Out; Padding Mode: Transparent and Mirror Edited May 16, 2015 by midora Quote Link to comment Share on other sites More sharing options...
midora Posted May 16, 2015 Author Share Posted May 16, 2015 (edited) Overview: Keyboard , mouse, and touch handling tbd Edited May 16, 2015 by midora Quote Link to comment Share on other sites More sharing options...
Maximilian Posted May 16, 2015 Share Posted May 16, 2015 Congrats on the first official release of a really nice plugin! And also thanks for the 3.5.11 compatibility! Quote Link to comment Share on other sites More sharing options...
nitenurse79 Posted May 16, 2015 Share Posted May 16, 2015 Congrats on the first official release of a really nice plugin! And also thanks for the 3.5.11 compatibility! I agree, nice work Quote Link to comment Share on other sites More sharing options...
ReMake Posted May 16, 2015 Share Posted May 16, 2015 Long work ended with a very good plugin. Quote Link to comment Share on other sites More sharing options...
midora Posted May 16, 2015 Author Share Posted May 16, 2015 Maimilian, Nitenurse, ReMake I hope you and others will find it usefull at some time. Special thanks to ReMake who did the translation to русский. Long work ended with a very good plugin. This triggers me to provide a little bit statistic about the amount of work. The c# source code is around 600kb or 14'000 lines of code. Just 3% of the code handles rotation, clipboard and file functions. The remaining part handles the User Interface. Around 70% precent of the code has been derived from other projects like the OptionBasedLibrary of PrintIt and the new code will be reintegrated to the code base. So hopefully most stuff can be reused in more sophisticated plugins. Maybe these numbers give you an idea about the amount of work, Rick invested in Paint.NET over the years. Quote Link to comment Share on other sites More sharing options...
ReMake Posted May 16, 2015 Share Posted May 16, 2015 Long work - this is my assessment of all of the great work of the programmer from idea to realization of this idea. The numbers are impressive! I treat with understanding and respect for Rick, which alone continues this hard work. And let Paint.NET pleases its fans for many years. Quote Link to comment Share on other sites More sharing options...
Red ochre Posted May 16, 2015 Share Posted May 16, 2015 Looks good! I will give this a try as works on both 3.5.11 & 4.x The statistics about the amount of work are mind-boggling! Many Thanks! Quote Red ochre Plugin pack.............. Diabolical Drawings ................Real Paintings Link to comment Share on other sites More sharing options...
Maximilian Posted May 17, 2015 Share Posted May 17, 2015 Long live our coders and their invaluable efforts!! Quote Link to comment Share on other sites More sharing options...
midora Posted May 17, 2015 Author Share Posted May 17, 2015 Long work - this is my assessment of all of the great work of the programmer from idea to realization of this idea. Remake you got an important point. Software development is much more then coding. It's a must for developers to slip into the role of users and not vice versa. Long live our coders and their invaluable efforts!! But only if there are users showing us their creativity. Quote Link to comment Share on other sites More sharing options...
Pixey Posted May 17, 2015 Share Posted May 17, 2015 Thank you @Midora for yet again making such a clever Plugin. I will try not to embarrass myself when using it for the first time. (Like I did with @BoltBait's ) Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
midora Posted May 17, 2015 Author Share Posted May 17, 2015 You never did Pixey. I may be a bit sensitive in this area ;-) When I constructed my house 4 years ago, we had to hammer 28 piles into the ground with an average length of 16m. Up to now the spirit level tells that everything is fine... Quote Link to comment Share on other sites More sharing options...
Seerose Posted May 18, 2015 Share Posted May 18, 2015 @midora! That is really a great plugin. Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted May 31, 2015 Share Posted May 31, 2015 Excellent plugin Midora! It took me a while to find it. I was looking for an entry called "Spirit level" in the Photo submenu. I think it would be better under this name than Rotate..... 1 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...
midora Posted May 31, 2015 Author Share Posted May 31, 2015 Excellent plugin Midora! It took me a while to find it. I was looking for an entry called "Spirit level" in the Photo submenu. I think it would be better under this name than Rotate..... You are right. If an effect has an explicit tool name (which you can remember) then you should use it at first. In the meantime you may change the entry "SpiritLevelEffect=Rotate using a Spirit Level" in the .dlc file 1 Quote Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted May 31, 2015 Share Posted May 31, 2015 In the meantime you may change the entry "SpiritLevelEffect=Rotate using a Spirit Level" in the .dlc file That's a neat trick! What a great idea. 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...
Eli Posted October 7, 2017 Share Posted October 7, 2017 Does anyone have this effect? I can not dowload it. Martin Osieka has not been on the forum for a while and the website where he hosts his files has been down for some time already. Quote Link to comment Share on other sites More sharing options...
Pixey Posted October 7, 2017 Share Posted October 7, 2017 Hi @Eli - I have put a Zip File in my drop box for you, but I think it's an old one. Hopefully it will work: https://www.dropbox.com/s/ldahass3rrvua0q/SpiritLevel.Effect v1.0.zip?dl=0 2 Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
Eli Posted October 7, 2017 Share Posted October 7, 2017 Thanks Pixey, I will download it. Quote Link to comment Share on other sites More sharing options...
Pixey Posted October 7, 2017 Share Posted October 7, 2017 I just tried it again myself, and it's working in the newest version of PDN . Took me a bit to find it though. It's in Photo: and appears as 'Rotate using a Spirit Level'. Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
Ego Eram Reputo Posted October 11, 2017 Share Posted October 11, 2017 Added link to zipped DLL into first post. 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...
Welsh Yellow Cheddar Posted October 31, 2023 Share Posted October 31, 2023 @midora I think this plugin has stopped working (at least for me) after the last paint.net update. Spoiler File: C:\Program Files\paint.net\Effects\SpiritLevel.Effect.dll Name: Effects.SpiritLevelEffect Version: 1.0.0.40 Author: Martin Osieka Copyright: © 2015, ComSquare AG, Switzerland Website: http://forums.comsquare.ch/viewforum.php?title=Paint.NET Tools Full error message: System.ArgumentException: An item with the same key has already been added. Key: D6, Control at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at ControlExtensions.AppCommands.Define(Enum commandId, String commandTextId, Keys commandKeys, Char commandCh, Image commandImage) at ControlExtensions.DocViewManager.CreateCommands(AppCommands commands, ResourceManager rm) at Effects.SpiritLevelDialog.CreateCommands() at Effects.SpiritLevelDialog..ctor(ControlContext context, String title) at Effects.SpiritLevelEffect.CreateConfigDialog() at PaintDotNet.Menus.EffectMenuBase.RunEffectImpl(EffectInfo effectInfo) in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 959 Quote Link to comment Share on other sites More sharing options...
Pixey Posted October 31, 2023 Share Posted October 31, 2023 4 hours ago, Welsh Yellow Cheddar said: @midora I think this plugin has stopped working (at least for me) after the last paint.net update. Reveal hidden contents File: C:\Program Files\paint.net\Effects\SpiritLevel.Effect.dll Name: Effects.SpiritLevelEffect Version: 1.0.0.40 Author: Martin Osieka Copyright: © 2015, ComSquare AG, Switzerland Website: http://forums.comsquare.ch/viewforum.php?title=Paint.NET Tools Full error message: System.ArgumentException: An item with the same key has already been added. Key: D6, Control at System.Collections.Generic.Dictionary`2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at ControlExtensions.AppCommands.Define(Enum commandId, String commandTextId, Keys commandKeys, Char commandCh, Image commandImage) at ControlExtensions.DocViewManager.CreateCommands(AppCommands commands, ResourceManager rm) at Effects.SpiritLevelDialog.CreateCommands() at Effects.SpiritLevelDialog..ctor(ControlContext context, String title) at Effects.SpiritLevelEffect.CreateConfigDialog() at PaintDotNet.Menus.EffectMenuBase.RunEffectImpl(EffectInfo effectInfo) in D:\src\pdn\src\PaintDotNet\Menus\EffectMenuBase.cs:line 959 Yes, it's only compatible up to v4.0.5. Until it's fixed, there is an alternative by @BoltBait called Level/Horizon Plumbob. Quote How I made Jennifer & Halle in Paint.net My Gallery | My Deviant Art "Rescuing one animal may not change the world, but for that animal their world is changed forever!" anon. Link to comment Share on other sites More sharing options...
toe_head2001 Posted October 31, 2023 Share Posted October 31, 2023 Works fine for me. Are there steps I need to take for it to crash? Quote (September 25th, 2023) Sorry about any broken images in my posts. I am aware of the issue. My Gallery | My Plugin Pack Layman's Guide to CodeLab 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.