ML Superresolution and GIFs

Talk about Pixelmator Pro, share tips & tricks, tutorials, and other resources.

The Pixelmator Community has been archived and cannot accept new posts or comments.

User avatar

2022-02-17 00:37:59

I have used MLSr feature for upscaling some gifs and it worked out amazingly. The process was such that I had to open a gif in Preview and then drag n drop out the frames, upscale each one of them independently and then drag n drop back in its right spot. I know it's probably not a really needed feature, but if you take suggestions - would love to have an opportunity to process a gif directly in your app.
User avatar

2022-02-17 07:59:28

by Keihol 2022-02-16 22:37:59 I have used MLSr feature for upscaling some gifs and it worked out amazingly. The process was such that I had to open a gif in Preview and then drag n drop out the frames, upscale each one of them independently and then drag n drop back in its right spot. I know it's probably not a really needed feature, but if you take suggestions - would love to have an opportunity to process a gif directly in your app.
Hi there, it's quite unlikely we'll add something like this in the near future BUT the good news is you can use Shortcuts to automate this! There's a built-in action called "Get Frames from Image" and "Make GIF", so all you need is Pixelmator Pro's Increase Resolution of Images action and a repeat loop. In fact, I whipped up a shortcut for you, which you can download here.

The Make GIF action has some slightly unusual resizing behavior – if you don't turn off Auto Size AND don't give it an explicit size, any GIFs with a longest edge of over 500 pixels will be downsized. The shortcut I've shared takes this into account, so everything should work just fine. You'll also see you can customize the amount of time between frames, which is cool:

Image

Anyway, hope that helps!
User avatar

2022-02-17 08:37:31

Andrius you are amazing, thank you! 👊💙
User avatar

2022-02-17 09:06:06

My pleasure!
User avatar

2022-02-17 09:56:54

Andrius, in case it's still possible to discuss this, I wanted to ask something about the Increase Resolution function. I noticed it converts a .png with a transparent background into a .jpeg with white background during the process. I have created a workaround by using Remove Background on the next step but it creates its own issues. Is there any way to leave a transparent .png in its original format during Increase Resolution?
User avatar

2022-02-17 12:51:37

by Keihol 2022-02-17 07:56:54 Andrius, in case it's still possible to discuss this, I wanted to ask something about the Increase Resolution function. I noticed it converts a .png with a transparent background into a .jpeg with white background during the process. I have created a workaround by using Remove Background on the next step but it creates its own issues. Is there any way to leave a transparent .png in its original format during Increase Resolution?
The super res action definitely shouldn't be changing the file type (I just double-checked the code and don't see anything suspicious), but maybe the order of your actions is having some effect, or you've linked up the magic variables in some slightly incorrect way? That part of using Shortcuts can be a little tricky – at least it was for me at the start. Could you share a screenshot of your shortcut or, better yet, the shortcut itself?
User avatar

2022-02-17 13:30:16

Sorry I wasn't clear. The white background thing happens with the originally suggested shortcut, which makes the resulting gif having a white background contrary to the initially uploaded gif with transparency. I've attached an image illustrating this, and also a link on the original gif being uploaded to the shortcut.


Image
https://imgur.com/a/JjPQUKg

the workaround I made in another shortcut based on yours by using Remove Background does the job, but it deletes a lot of extra stuff which it considers being the background but which is part of an image's figure.

Then I actually got inside of what the original shortcut does and noticed that if I feed the original shortcut a png, it returns a jpg filled with white.
User avatar

2022-02-17 14:02:39

Oh, OK, understood – yeah, it looks like the Get Frames from Image action always returns JPEG images and isn't customizable, which is a little strange and also a pretty big roadblock to retaining transparency. The only thing I can think of at the moment is extracting the frames from the GIF some other way. The simplest way is drag and drop from Preview, and then adjusting the shortcut to accept a series of images, increase resolution, then combine them into a GIF. It's a simple way but definitely not a quick one. I checked the Make GIF action and that seems to preserve transparency just fine, so at least that one's OK. If you're handy with command-line tools, you could try getting the frames out using something like ImageMagick, but other than that, I'm out of ideas. :disappointed:
User avatar

2024-01-19 05:16:15

hello, Andrius thank you for your post! i am trying to click the shortcut link you created in your original post but the link isn't working for me - could you repost shortcut in this thread, this feature would be extremely beneficial for me :)