flameshot-org / flameshot

Powerful yet simple to use screenshot software :desktop_computer: :camera_flash:
https://flameshot.org
GNU General Public License v3.0
24.74k stars 1.58k forks source link

rounded corners for screenshots #1156

Open alperyilmaz opened 3 years ago

alperyilmaz commented 3 years ago

Is your feature request related to a problem? No

Hi. Is it possible to save the image with rounded corners? Maybe it can be added as a CLI option or maybe as an icon in the gui.. This is not a must have option but (I think) it's easy to implement and aestheticly pleasing..

borgmanJeremy commented 3 years ago

How should we determine the radius of the rounded edge?

alperyilmaz commented 3 years ago

based on imagemagick code below, a set value can be used (such as 15). Or, it can be proportional to image size. Also, for corners to be noticeable, alpha channel should be added to the image

convert $filename \( +clone -alpha extract \
   \( -size 15x15 xc:black -draw 'fill white circle 15,15 15,0' -write mpr:arc +delete \) \
   \( mpr:arc \) -gravity northwest -composite \
   \( mpr:arc -flip \) -gravity southwest -composite \
   \( mpr:arc -flop \) -gravity northeast -composite \
   \( mpr:arc -rotate 180 \) -gravity southeast -composite \) \
   -alpha off -compose CopyOpacity -composite
borgmanJeremy commented 3 years ago

My question is more related to what is the best way in the GUI to let the user set the size of the radius. I think we should just follow the global thickness for now. @mmahmoudian thoughts?

alperyilmaz commented 3 years ago

sorry, I completely misunderstand the intent. Maybe ctrl (or shift) mouse wheel can be used to determine roundedness thickness..

mmahmoudian commented 3 years ago

Interesting concept. Assuming that a user will not change this setting as frequent as thickness of tools, it might make more sense to have an option for it in General tab of the config UI (and a section in the config file corresponding to this) that gets the radius as an integer in pixels.

On general note, I personally don't find this feature useful, but I don't see it far off the general context of Flameshot either. Of course, one way to look at it is to implement a feature in Flameshot CLI that outputs the image to the stdout so that users can pipe it into any CLI pipeline.

fdmarcin commented 2 years ago

I'd like to have this option as well.

It could be configured in UI either as a slider or with a numerical value.