feat: add pixelate and pseudo-pixelate#469
Conversation
|
for brighter images, the "independent mode" result is a bit too bright. Maybe the weighting math isn't great yet. EDIT: need to divide everything by two if I have a a horizontal and a vertical influence, they each add to 1. that looks a lot better. Unfortunately, now I have to redo the recording. |
863d1f5 to
5313f33
Compare
|
Perhaps we also really need to call this "pseudo-pixelate", no need to re-invent lingo? 😉 |
88b650e to
05a65bd
Compare
yup, I noticed that too while using/testing this locally, at the very least it needs some indication whether the selected area is big enough or not. That'll need some rework, i'll place this in draft mode for now. |
Closes: Satty-org#90 This implements a pixelate tool with two modes - regular mode with a normal block pixelation, this is, depending on selected area and image resolution, reversible - "independent mode" that takes data from outside the selected area, the area is entirely overwritten by this. Then, the regular pixelation creates a block-pixelate look. Some things are still open: [ ] figure out a better icon - help needed please [ ] reach out to flameshot guys regarding credits [ ] figure out if BLOCKSIZE is good at a value of 32. This may actually need to be adjustable. Known limitations: - in independent mode, canvas background may contribute to the mix of pixels if the selection is started at image origin - in idependent mode, if the selection "leaves" Satty's window, nothing happens. We would be lacking one fringe in that instance. This PR was inspired by - https://github.com/flameshot-org/flameshot/pull/3765/changes - Satty-org#468 by kikeijuu (superseded by this PR) Regarding the credits, the idea with taking "fringes" was taken from said PR, but I reimplemented the gist of it according to my understanding. I did, for example, skip any additional noise which might be suitable for adding later. Also, actually iterating the source and target data works a bit different due to the objects used. I don't think we need to talk about a separate licence for this bit, but we'll see what the flameshot guys say about this.
05a65bd to
d4a291e
Compare
|
Hey there, just came across this pull and noticed the following in the OP:
On Flameshot this is handled using the scrollwheel to change tool size (also the case for the rest of the sized tools, such as line width, etc). I personally use a tool size of 2 on most occasions, equating to 6px blocks for me: Adjustable block size would be highly appreciated as it can help emphasise that an area is meant to be pixelated in a final image, depending on the scale of the surrounding elements. |
|
Thank you for sharing this. Personally I do not switch the tool size much, but I like the idea for blur and pixelate, there the S-M-L might not be sufficient. Pixelate so far does not take S-M-L into account. I was also thinking about integrating pixelate into the existing blur tool to avoid adding another toolbar button. But currently we have no concept of tool individual styles, which might be handy to switch between blur/pixelate, add double arrow, switch rounded rectangle on/off, etc. |
|
I would tie it to S-M-L and annotation size factor, and a static modifier, which is from top of my head what the other tools do. I wouldn't add a scroll wheel logic specifically for this -- but the scroll wheel does work on the annotation size, so at least there's that. ;) |
If such a concept was ready to use, I might add this to the blur tool. But actually coming up with a concept and discussing it, I think we should open a separate issue :) |




Closes: #90
This implements a pixelate tool with two modes
Some things are still open:
Known limitations:
This PR was inspired by
Regarding the credits, the idea with taking "fringes" was taken from said PR, but I reimplemented the gist of it according to my understanding. I did, for example, skip any additional noise which might be suitable for adding later. Also, actually iterating the source (fringes) and target data (overwritten area) works a bit different due to the objects used. I don't think we need to talk about a separate licence for this bit, but we'll see what the flameshot guys say about this.
pixelation2.mp4