Auto Crop removes part of the image
Bug #1191390 reported by
Nichole Ober
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Pinta |
Fix Released
|
Medium
|
Unassigned |
Bug Description
Using the Auto Crop tool under image removes too much of the image. This is very noticeable when using the tool when there's nothing to crop. Instead of leaving the canvas alone, the left, bottom, and right pixels will get cut off by 1 pixel. If the tool is used repeatedly, the image will eventually shrink to nothing. The program will also completely crash if the canvas gets re sized too small, showing a box with no text or buttons, then terminating completely.
The best way to test this is to open any image and hold the key combo for auto crop (ctrl + alt + x).
The code for autocrop can be found in Pinta.Core/
Changed in pinta: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
Changed in pinta: | |
assignee: | Nichole Ober (nicholeober) → nobody |
Changed in pinta: | |
milestone: | 1.8 → 1.7.1 |
Changed in pinta: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I managed to reproduce the crash on master on Windows XP: Reflection. TargetInvocatio nException: Exception has been thrown by the target of an invocation. ---> System. DivideByZeroExc eption: Attempted to divide by zero. DocumentWorkspa ce.set_ Scale(Double value) in c:\Zaloga\ Pinta-master\ Pinta.Core\ Classes\ DocumentWorkspa ce.cs:line 100 ImageActions. CropImageToRect angle(Document doc, Rectangle rect) in c:\Zaloga\ Pinta-master\ Pinta.Core\ Actions\ ImageActions. cs:line 286 ImageActions. HandlePintaCore ActionsImageAut oCropActivated( Object sender, EventArgs e) in c:\Zaloga\ Pinta-master\ Pinta.Core\ Actions\ ImageActions. cs:line 268 RuntimeMethodHa ndle._InvokeMet hodFast( IRuntimeMethodI nfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) RuntimeMethodHa ndle.InvokeMeth odFast( IRuntimeMethodI nfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) Reflection. RuntimeMethodIn fo.Invoke( Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityC hecks) Delegate. DynamicInvokeIm pl(Object[ ] args) ClosureInvokedC B(Object o, ClosureInvokedArgs args) ure.Invoke( ClosureInvokedA rgs args) ure.MarshalCall back(IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data)
1. New image.
2. Pencil from Tools and on canvas just click to create one dot.
3. Image | Auto crop and crash appears with the following error:
=============
System.
at Pinta.Core.
at Pinta.Core.
at Pinta.Core.
--- End of inner exception stack trace ---
at System.
at System.
at System.
at System.
at GLib.Signal.
at GLib.SignalClos
at GLib.SignalClos
=============
P.S. I am removing easy-to-fix tag. This code requires some knowledge how auto crop works and easy-to-fix is tag for total beginners.