Jump to content
You must now use your email address to sign in [click for more info] ×

HOWTO: Generate aligned cropped frames for animated GIFs


Recommended Posts

So ages ago I asked about using Photo's stack function to generate aligned images for an animated GIF.
All the hints were about using the slices in the export persona.
But I never got the crop to work on all the slices.
I have seen similar questions and answers since then.
Today I tried again, looked through answers and one thing finally gave me the hint I needed:
Rasterize & Trim, that finally resulted in an applied crop in the slices for export.

So if you do not use Rasterize & Trim your slices will not have applied crops,
it looks like this:slices1.thumb.JPG.3fd6c84826ee804588ad860181e77b1e.JPG

But if you painstakingly apply Rasterize & Trim to all the layers, then you see an applied crop in the export persona and everything is fine:

slices2.thumb.JPG.5d5d4d160ca26718cd6ad1ff4e2cd5a9.JPG

Any ideas on how to apply "Rasterize & Trim" to all layers in one go?

And just for completeness a hint on the GIF generation:
ImageMagick is very easy, but also very inefficient, so I switched to FFMPEG which produces GIFs that are half the size in a much shorter time:

ffmpeg -framerate 4 -pattern_type glob -i '*.png' out.gif

Note, I use PNGs, with JPGs I had artifacts.

cheers
afx

You just have to live and life will give you pictures. – HCB

Link to comment
Share on other sites

On 4/5/2021 at 8:35 PM, afx said:

Any ideas on how to apply "Rasterize & Trim" to all layers in one go?

Hi afx,

 

In a similar situatrion, i recorded a macro and executed it on one layer, and run it for every layer.

You may record a macro which applies this command to multiple layers to safe more clicks.

Or you can assign a keyboard shortcut to reduce inputs.

Please add your vote to the feature request:

 

 

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Thanks, but as the Windows version has no keyboard command to advance to the next layer, the macro solution seems impossible.

cheers
afx

You just have to live and life will give you pictures. – HCB

Link to comment
Share on other sites

Hmm, I've downloaded it from here and reloaded it to Photo. It works so it's not corrupted

My version of Photo is 1.9.2.1035, an earlier version may not work. You need to import it into the Macro panel not the Library as it is .afmacro not .afmacros. If that doesn't help I'm stuck

When you record the macro, click on the layer below with the mouse, there is no keyboard shortcut as you know. This then writes the amazingly helpful "Set current selection" into the History

Microsoft Windows 11 Home, Intel i7-1360P 2.20 GHz, 32 GB RAM, 1TB SSD, Intel Iris Xe
Affinity Photo - 24/05/20, Affinity Publisher - 06/12/20, KTM Superduke - 27/09/10

Link to comment
Share on other sites

13 minutes ago, David in Яuislip said:

You need to import it into the Macro panel not the Library as it is .afmacro not .afmacros.

....

When you record the macro, click on the layer below with the mouse, there is no keyboard shortcut as you know. This then writes the amazingly helpful "Set current selection" into the History

Ok, my error. The import button in Macros did not get me a file browser, so I thought I had to rename it to macros and try the library way.

Once I had a macro recorded, I also could load the file.

The mouse selection is puzzling, but helpful ;-)

I'll try to recreate manually. Yup, that worked!!!

thx
afx

You just have to live and life will give you pictures. – HCB

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.