Changing Icon Size from 16 to 32 causes the top toolbar to break and an error to appear

Description

Steps to Recreate Issue

1. Take a screenshot using the Printscreen keyboard button
2. Click "Open with image editor"
3. While editing the screenshot, go to Edit > Preferences
4. The current Icon Size is 16. Click "^" arrow to increase to 32, then click Save.
5. After a few seconds, the application will display an error and the toolbar will be disfigured and turn white and red. Please see screenshot below:

6. When I attempt to dismiss the error, it will appear again until I go back to Edit > Preferences and change the Icon Size back to 16. I also have to restart the application afterwards.

Error Generated From Greenshot

Software version: 1.2.10.6-RELEASE-c2414cf0149a1475ea00520effc01b40087c225c (64 bit)
.NET runtime version: 4.0.30319.42000+
Time: 2019-06-10 11:28:45 -04:00
OS: unknown (x64) 10.0 build 17134 revision 0
GDI object count: 211
User object count: 114

Exception: System.ArgumentException
Message: Parameter is not valid.

Stack:
at System.Drawing.Image.get_RawFormat()
at System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y, Int32 width, Int32 height)
at System.Drawing.Graphics.DrawImage(Image image, Rectangle rect)
at System.Windows.Forms.ToolStripProfessionalRenderer.OnRenderItemImage(ToolStripItemImageRenderEventArgs e)
at System.Windows.Forms.ToolStripRenderer.DrawItemImage(ToolStripItemImageRenderEventArgs e)
at System.Windows.Forms.ToolStripSplitButton.OnPaint(PaintEventArgs e)
at System.Windows.Forms.ToolStripItem.HandlePaint(PaintEventArgs e)
at System.Windows.Forms.ToolStrip.OnPaint(PaintEventArgs e)
at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at Greenshot.Controls.ToolStripEx.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Configuration dump:

Environment

Windows PC, running latest stable version of Greenshot (1.2.10.6)

Attachments

1

Activity

Jamie SmithJune 11, 2019 at 2:33 PM

Robin, thanks for the response. I tried this and it worked finally! The bug technically still exists, but you can close this ticket because my issue is resolved.

Robin KromJune 10, 2019 at 4:54 PM

My advice for the time being is to only change the icon size once and restart Greenshot. This solves a lot of issues.

In newer versions we plan to automatically resize depending on the DPI settings.

Jamie SmithJune 10, 2019 at 3:41 PM

I'm unable to edit the ticket, so please update "Environment" to:

  • OS: Windows 10 Home

  • Device: Dell laptop, 1.80Ghz processor and 8 GB of RAM

This is not an urgent bug, it just reduces usability when the icons are so small. Thank you.

Details

Assignee

Reporter

Priority

Created June 10, 2019 at 3:36 PM
Updated December 21, 2020 at 1:51 PM