pencil icon indicating copy to clipboard operation
pencil copied to clipboard

Implement a way to resize multiple imported images through customizable scaling settings

Open Kaikogf opened this issue 4 years ago • 4 comments

Issue Summary

As the title says, the imported image doesn't have any particular feature to resize our images after being imported. The only way for us to have them kind of resized to our needs is doing as follow:

When importing say an image, the image is imported correctly (using shortcuts or not) . If considering an image has a particular size, it will be pasted on the canvas as it is. Meaning if it is smaller than the canvas, or bigger than it, the only way to get it fitted to the canvas size (or any particular disposition) is to go to the camera layer and there zoom in/out the image till you like it, and finally go back to the bitmap layer and there you go….

So, my question is: is it possible to implement a resize image feature for this purpose? Or being pencil2d an animation program it will make no sense implementing this?

[NOTE: I noticed pencil2D was freezing when imported an image, about 6MB for this purpose… So it was TOOOO MUCH for pencil2D when I tried the drawing tools, the program was lagging that it froze for some time, despite the 32GB memory]

System Information

  • Pencil2D Version: 05/set/2020

  • Operating System: Win 10

  • RAM Size: 32GB

Kaikogf avatar Sep 07 '20 16:09 Kaikogf

@Kaikogf Hi. Thank you for the request I think it's a nice idea to have some image scaling features for import something like:

  • [x] 1:1 Scaling (this is what we have now)
  • [ ] Fit to Camera: Stretch Scaling
  • [ ] Fit to Camera: Proportional Scaling
  • [ ] Fit to View: Vertical (this would take the vertical space between panels and toolbars I suppose)
  • [ ] Fit to View: Horizontal
  • [ ] Fit to Custom: In here we could apply different "filters" to match images to the camera or canvas in a certain way. This would help to import image sequences that have a size mismatch (too big or too small heterogeneous sizes)

Now the real problem is that Pencil2D does not currently have any kind of image processing algorithm for upscaling or downscaling, so if we were to implement this right now it would destroy the imported image quality. As such this particular request will depend on that implementation.

Regarding your other issue, as always I encourage you to report individual issues separately. Report the image import freeze in a different ticket so we can keep track of it. We're trying to individualize most issues like that recently as we've noticed there are sub issues we and other users brought that weren't addressed before. If possible please also attach the image you had trouble with.

Jose-Moreno avatar Sep 07 '20 21:09 Jose-Moreno

I forgot to mention that currently also we have this implementation pending for review / merge https://github.com/pencil2d/pencil/pull/1325 which aims to reposition the canvas content for multiple keyframes.

If this PR were to be enhanced later to apply not only position but all the other supported transforms (rotation, scaling, etc) it would be viable to implement an in-editor modification tool for multiple images that deals with scaling, however this idea I'm mentioning is only one part of what Kaiko seems to be proposing, and as I understand it, his request also seems to deal with the normalization of heterogeneous sizes in multiple imported / selected images.

So for example If we have various images with different sizes (let's say different teams collaborated in a single project), the customization part of this proposal would be to filter and sort each image by resolution size and then retro-fit them to the canvas so they all have one single size.

Additionally image cropping would also be involved when re-scaling mixed media, so depending on the input media sizes, we would also have to consider adding a cropping feature that can be applied to multiple images (perhaps using the selection tool as crop area like in Photoshop).

Jose-Moreno avatar Sep 07 '20 22:09 Jose-Moreno

"to filter and sort each image by resolution size and then retro-fit them to the canvas so they all have one single size" 👍 That is part of the general idea I proposed. I am used to work with XaraDesign and I like the exported feature which allow us to implement our preferences in size and format we desire for our images and them the program will memorize them and will apply to any other image from that moment on, closing the program will keep the changes. At the end we will have different images initially created with different sizes and formats, all with similar sizes and same format.

NOTE: the initial post was for imported images. The example I gave here is for exported images, but I think implementing one way will help the other (... where can I learn development software? LOL)

Kaikogf avatar Sep 11 '20 13:09 Kaikogf

About the freeze part @Jose-Moreno , I will check exactly what may have cause it, and wait for another update of pencil2d

Kaikogf avatar Sep 11 '20 13:09 Kaikogf