Jump to content

'Spirit Level' Tools Effect


midora

Recommended Posts

Released. See Spirit Level Photo Effect

 

---

 

OK there are several methods to rotate an image in Paint.NET. But the tool I missed always is the the spirit level.

 

This tool works in the way that you put your spirit level (represented by a line) on the image and the image will be rotated so that the spirit level is horizontal.

 

The Api does not allow us to add tools so the solution is using a tools effect.

 

So just to see if you understand and accept the UI here is

 

Near to release a version for people who like to add/complete a translation

Edited by midora
  • Upvote 5

midoras signature.gif

Link to comment
Share on other sites

Useful tool. Thank you kindly :)

 

I just needed it last week several times. So I updated some older code to my current toolbox. And it^s best for a developer if the output is usefull for others too.

 

I'm still thinking about to rotate the imagge in the plugin canvas already. Maybe I^m adding a switch to support this.

midoras signature.gif

Link to comment
Share on other sites

I guess we will never be out of level in the future with the amount of leveling plugins now ;-)

 

0.3 (20.4.2015)
- Distinguishes between horizontal and vertical leveling. 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.
- Attached more entries to the menu and more controls to the canvas to make
  zooming and moving of the canvas content easier. Most keys have the same
  meaning as in Paint.NET. There is one special extension. Using the mouse wheel
  while the right mouse button is pressed zooms the image. So there is no need
  to keep the control key pressed. Zoom center in the image is at the mouse
  position. Starting the zoom will move the mouse and the zoom center of the
  image to the center of the canvas.
- Moved to Effects->Photo as proposed by BoltBait
- Remake provided a first basic translation for Russian, thanks
 

midoras signature.gif

Link to comment
Share on other sites

Maybe Rick could add such a tool to the toolbar in the future. This would make all these plugins obsolete.

midoras signature.gif

Link to comment
Share on other sites

Back to the question if the plugin should show the rotation in the pugin canvas immediately after drawing the reference line.

Here an example of drawing the line at the center axis of the tower.

The image and the line rotates and the line will be vertical.

 

SpiritLevel.Effect.Dialog.jpg

midoras signature.gif

Link to comment
Share on other sites

Update 0.4 (21.4.2015)
- The preview excutes the rotation immediately and adapts the position of the
  line. The border of the rotated image is not anti-aliased and may be one pixel
  off because of restrictions in GDI+. This should not happen in the final image.
- Added Menu->Edit->Autoscale feature with the modes: Off, Scale In (default),
  and Scale Out.
  Autoscaling modes allow you to define how the rotated image will be cropped.
  - Scale In will increase the image content automatically after rotation so
    that there are no empty pixels visible.
  - Scale Out will shrink the image content so that no detail of the immage is
    lost with the disadvantage of empty pixels.
- Copy to clipboard copies the rotated image unscaled and uncutted. This way
  you have access to the rotated image in the new size. This functionality
  is not possible via the standard plugin interface which does not allow to
  change the size of a layer.
 

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

A more toolstrip like version.

 

Update v0.5 (23.4.2015)
- Ctrl-R can be used to toggle between Auto Scale modes
- Improved clipboard handling for large images
- Added a toolbar containing the options specific to the Spirit Level tool
- The Spirit Level line can be dragged to another location to verify that it
  matches an other object. Dragging the line does not change the angle.

 

SpiritLevel.Effect.Dialog%200.5.jpg
 

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

What do you think, should there be a simular tool to correct converging verticales by placing two lines on the image?

This would be a perspective correction and not a rotation.

midoras signature.gif

Link to comment
Share on other sites

What do you think, should there be a simular tool to correct converging verticales by placing two lines on the image?

This would be a perspective correction and not a rotation.

This has been done before. Of course, there is always room for improvement.

http://forums.getpaint.net/index.php?showtopic=16197

Enjoy.

Link to comment
Share on other sites

Yeah I know, there are several plugins to do perspective transformations.

But I'm talking about a complete different UI.

More like a specialized grid warp.

midoras signature.gif

Link to comment
Share on other sites

I would encourage you to add it to your plugin. That's why I said that there's always room for improvement.

 

I got it ;-)

 

The realtime handling is a little bit more complex and much slower than a simple rotate but let's see.

midoras signature.gif

Link to comment
Share on other sites

Update 0.6 (28.4.2015)
- Added 'Copy rotated image' command button to the tool strip.
- Added rulers (Toggle with Alt+Shift+R).
- Added guides (Toggle with Alt+Shift+G).
  Click inside of a ruler to create a new guide.
  Drag the guide inside of the ruler to set a new position.
  Drag the guide out of the ruler to remove it.
 

midoras signature.gif

Link to comment
Share on other sites

Update 0.7 (5.5.2015) Canvas improvements
- Single click will no longer reset the rotation use double click now.
- Most of the UI parts can now be switched on and off via menu or shortcut keys.
  ALT+SHIFT
    +M: Menu bar, +T: Tool bar, +S: Status bar, +N: Narrow look
    +R: Rulers, +D: Scrollbars, +G: Guides, +P: Pixel grid, +B: Image border
    +U: Toggle unit, +Z: Toggle zoom modes
- All zoom, align, and scroll commands in the canvas can be done with shortcuts.
  (see menu entries)
- Window commands with shortcuts: Fullscreen mode (ALT+Enter), Restore
  (Alt+Back), Maximize (ALT+F2), Minimize (ALT+F3)
- Mouse wheel scrolls the canvas vertically.
  Tilting the wheel scrolls horizontal.
  Mouse wheel with pressed right mouse button (or control key) zooms the content
    of the view.
  Keep Middle mouse button pressed to pan the image in canvas.
  Double click with the middle button centers.
- The UI configuration will be saved and restored.
- Fixed additional HighDPI issues (i.e. cursor size in rulers).
- Touch support:
  One finger Tap and drag to create line or to select points or line to drag them.
  Two finger pan is not restricted to horizontal or vertical gutter.
  Two finger zoom allows you to zoom and to move the drag center.
  Two finger tap toggles between 'Standard zoom (100%)' and
    'Zoom and lock to view'
  Two finger rotate is not used in this derivation of the canvas.
 

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

@midora! This is a awesome plugin. Many thanks for your hard work. a7djrf8g.gif r7mbeb9k.jpg

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to comment
Share on other sites

@midora! This is a awesome plugin. Many thanks for your hard work. a7djrf8g.gif r7mbeb9k.jpg

 

Hi Seerose thanks that you are always so nice to the developers here. We appreciate.

midoras signature.gif

Link to comment
Share on other sites

Hi Seerose thanks that you are always so nice to the developers here. We appreciate.

 

@midora! With your hard work and technique exists paint.net. Without plugins writer our hands tied. God bless you all.  xblf4ioa.gif

Edited by Seerose

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to comment
Share on other sites

Wow looks like a lot of hand work done in this piece. Hope we can do these things easier in the future.

  • Upvote 1

midoras signature.gif

Link to comment
Share on other sites

Update 0.8 (10.5.2015)
- Added Padding Modes: Transparent, Primary, Secondary, Keep, and Mirror
  Defines how uncovered areas will be filled if the auto scale mode is not 'In'
- Fixed the missing checkerboard background
- Fixed issue with some keyboard layouts
 

midoras signature.gif

Link to comment
Share on other sites

Overview scaling and padding modes

 

SpiritLevel.Effect.Dialog.jpg

 

 

Auto scale: Scale In; Padding Mode: Transparent and Mirror (no difference)

 

sunset%20AutoScaleIn.jpg  sunset%20AutoScaleIn%20PaddingMirror.jpg

 

Auto scale: Off; Padding Mode: Transparent and Mirror

 

sunset%20AutoScaleOff.jpg  sunset%20AutoScaleOff%20PaddingMirror.jp

 

 

Auto scale: Scale Out; Padding Mode: Transparent and Mirror

 

sunset%20AutoScaleOut.jpg  sunset%20AutoScaleOut%20PadiingMirror.jp

Edited by midora
  • Upvote 3

midoras signature.gif

Link to comment
Share on other sites

@midora! Thanks so much for the new version. 9gut87cp.gif

Live as if you were to die tomorrow. Learn as if you were to live forever.

Gandhi

 

mae3426x.png

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...