Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cropping #541

Closed
caleybrock opened this issue Sep 2, 2016 · 8 comments
Closed

Cropping #541

caleybrock opened this issue Sep 2, 2016 · 8 comments
Assignees
Labels

Comments

@caleybrock
Copy link

cc @poorvasingal @islemaster (also from code-dot-org)

While you can achieve the same affects with the re-size tool, it'd be nice to also have a cropping feature that lets you see what size you want while you are cropping, similar to photoshop.

As a heads up, this is on our potential list to contribute to piskel so we can use it in the code-dot-org fork, if you have any specific thoughts on this already, let us know. Thanks!

@ghost
Copy link

ghost commented Nov 21, 2016

Good idea @caleybrock, I use piskel and an additional cropping tool would be a brilliant addition. @juliandescottes should totally add this!

@juliandescottes
Copy link
Collaborator

juliandescottes commented May 14, 2017

hi @caleybrock !

I know this is a pretty old issue, but could you share a bit more about the UX for this?

Maybe something that would "crop to the current selection" ?

  1. select an area
  2. click on the crop tool
  3. => all the frames are cropped to the area defined by the selection.

That could be an additional tool available in the toolbox on the right. Although it would only make sense when a selection is active, so maybe not the best idea ...

@caleybrock
Copy link
Author

Hi @juliandescottes!
I don't think we've made a spec for this yet, but it's definitely a feature request we often get from our students so it's still something we'd like to add in the future.

My idea was that there would be a separate crop tool that made a selection like the selector tool, then had some sort of confirmation (maybe a dialog) that crops across frames.

@poorvasingal is the product manager for Code.org's Game Lab and might have more thoughts.

@poorvasingal
Copy link

poorvasingal commented May 15, 2017

@juliandescottes - I think what you suggested makes sense (select an area and then click the crop tool). I do think putting it with the toolbox on the right makes the most sense. Here are a couple possibilities of what to do if nothing is selected:

  1. Show the crop icon as disabled.
  2. Do an automatic crop which crops out the transparent edges of the image. For example, imagine you had a 100x100 frame but the sprite you drew was contained within a 50x50 area. The automatic crop tool would crop out the edges such that you end up with a 50x50 frame. With multiple frames, you'd of course need to consider the boundaries of all the images in all of the frames, and crop such that you only take out transparent areas and never clip any part of an image.

I think 2) would be really cool because that's often why students want to be able to crop in the first place. So I bet in a lot of cases, we'd be able to help eliminate the need for students to make a selection first.

Thoughts?

@juliandescottes
Copy link
Collaborator

Thanks for the feedback @caleybrock & @poorvasingal !

I really like option 2) , crop/trim based on the content or based on the current selection if any.
I don't have anything to add to the behaviour you described :)

If you end up implementing it first, I would definitely be interested to get it upstream.

@juliandescottes
Copy link
Collaborator

I got a first version ready at #695

Feedback welcome!

@juliandescottes
Copy link
Collaborator

Closing, will be released in v0.12.0

@caleybrock
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants