publiclab / image-sequencer

A pure JavaScript sequential image processing system, inspired by storyboards
https://sequencer.publiclab.org
GNU General Public License v3.0
110 stars 210 forks source link

Round image corners module #788

Open aashna27 opened 5 years ago

aashna27 commented 5 years ago

I was thinking if it would be good to make a module wherein we round the corners of an image.Would like some opinions and suggestions before working on it.

Please show us where to look

http://sequencer.publiclab.org...

Thank you!

harshkhandeparkar commented 5 years ago

@aashna27 this is a coop idea. I also had the same idea in mind but instead of opening an issue I was planning on opening a PR 😁. But then I thought that this will be pretty difficult. I think first we can create a draw circles module and then use the same algorithm( parts of it) to create this. What do you think?

harshkhandeparkar commented 5 years ago

The biggest problem will be that we will not be able to delete parts of the image since it is stored as an ndarray. If it was a bitmap then it would be a different case. Since the other modules also need to work on it, I think parts of the image will have to be rendered with alpha=0 instead of making the image circular. This is why I felt like this is a very difficult issue.

Divy123 commented 5 years ago

Please mention the usecases of the said module.

jywarren commented 5 years ago

Could use the masking module once that's done!

On Sun, Feb 17, 2019, 1:30 PM Slytherin <notifications@github.com wrote:

Please mention the usecases of the said issue.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/publiclab/image-sequencer/issues/788#issuecomment-464512047, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ4bXfjn5xU4ABEFG52rOPglbucTdks5vOcnmgaJpZM4a_rKK .

sashadev-sky commented 5 years ago

@aashna27 thats a cool idea! I haven't worked enough with image sequencer to know if these additional ideas would be relevant but I use rounded images a lot with a sort of "img card" effect that looks like: (would typically have text over it but its taking very long time to load)

screen shot 2019-02-17 at 7 37 32 pm

and also used very often with shadows to create this 3D effect:

screen shot 2019-02-17 at 7 39 40 pm

Just two ideas you could add on to yours as editing features to go with rounded edges. So its really like a full module.

vibhorgupta-gh commented 5 years ago

@aashna27 if you're doing this, you can accept a circle radius as a parameter from the user end to determine to what extent the corners shall be rounded.

aashna27 commented 5 years ago

Thanks a lot for your inputs, I request some time before I can come up with anything , really glad with the response and your suggestions . Thank you ❤️

jywarren commented 5 years ago

Whatever you do, you could use the new MetaModules system to join a set of modules to accomplish your goal!

On Wed, Feb 20, 2019 at 1:27 AM aashna27 notifications@github.com wrote:

Thanks a lot for your inputs, I request some time before I can come up with anything , really glad with the response and your suggestions . Thank you ❤️

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/publiclab/image-sequencer/issues/788#issuecomment-465494854, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ9qtDfnWwO4eiTCHPrFZUd0XpR8Hks5vPRT9gaJpZM4a_rKK .

aashna27 commented 5 years ago

Yeahh, got it 😀Thanks a lot!

niravasher commented 5 years ago

If you are working on round image corners, can I work on adding a shadow to the image? There will be an option to set a shadow in all the four direction (up right, up left, down right and down left) @aashna27 @VibhorCodecianGupta ??

jywarren commented 5 years ago

Hi Nirav, thinking on this, I think we should open a new issue to discuss a shadow module. We'll have to consider images with transparent backgrounds. I could imagine creating a black mask by turning darkness to max, then blurring that mask. It seems we would also need to increase the image size to make space for the shadow. Anyhow we could plot this out using the new metamodules system and discuss this in a new issue. Thanks!

On Thu, Feb 21, 2019, 7:52 AM Nirav Asher <notifications@github.com wrote:

If you are working on round image corners, can I work on adding a shadow to the image? There will be an option to set a shadow in all the four direction (up right, up left, down right and down left) @aashna27 https://github.com/aashna27 @VibhorCodecianGupta https://github.com/VibhorCodecianGupta ??

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/publiclab/image-sequencer/issues/788#issuecomment-466051717, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJyWysXfVDpb5M_iezVahwrfW3Vc8ks5vPsCZgaJpZM4a_rKK .

harshkhandeparkar commented 5 years ago

@jywarren I think a cool way to do the shadow module would be (if it works) to use a metamodule. The image can be resized, a gradient can be applied (which can work as a shadow), and the original image can be overlayed on it. What do you say?

niravasher commented 5 years ago

Opened a new issue #806 @jywarren @HarshKhandeparkar

harshithpabbati commented 5 years ago

Can I work on this???

harshithpabbati commented 5 years ago

Can I use jquery.corner.js to make it done??? Or else using only the javascript??

aashna27 commented 5 years ago

Can you look for some other issue, I am not getting time these days so haven't been able to give it a shot.

harshithpabbati commented 5 years ago

Ok fine