Batch Export Utility Needed

What features would you like to see in Pixelmator Pro?
User avatar

2018-07-11 14:51:00

I just purchased Pixelmator Pro and I'm really excited about the automated color adjustments tool. My job requires editing several hundred images every day and up to now I've had to do that in Photoshop. To help speed up the process, I created a whole list of custom actions. With one click Pixelmator Pro does a better job of correcting images than I can often do manually in Photoshop. The one problem is that at the end of the day, I need to go back and manually export each Pixelmator file into a jpeg file. Given that the Pixelmator file is proprietary I think it is important to have an easy way to convert multiple files at one time.

I know not everyone edits hundreds of photos a day, but most photographers will have events (weddings, photo shoots, vacations) where they have multiple photos they need to save as jpegs. I'm hoping that soon there will be an easy way to do this.
User avatar

2018-07-13 12:49:34

I already let Max know about this via email, but in case anyone else is interested, we are considering adding our Auto Color Adjustments as Automator actions in some form. :pray:
User avatar

2020-10-14 12:04:19

Hello... it's been a while. Is there anything new on this? I have 20 images open in Pixelmator and I cropped them all... what's the best way to export them all at once? There's still no "export all" command in the menu.

I regularly work with large batch of images and having to export them one at a time is quite a pain.
User avatar

2020-10-14 14:42:41

There isn't a built way to do this, but it's quite easy to script this using the recently added AppleScript support.

Here's a script that would do this for you:
tell application "Pixelmator Pro"
	set exportLocation to choose folder with prompt "Please select where you'd like export the images:"
	repeat (number of documents) times
		export the front document to file ((exportLocation as text) & (name of the front document) & ".jpg") as JPEG with properties {compression factor:85}
		close the front document without saving
	end repeat
end tell
In the example above, the images would all be exported with their current names and with 85% quality as JPEG files.

If you'd like, you can make the script menu visible in your menu bar (you'll find the option for that in Script Editor preferences), save the script above in your scripts folder, and you'll always have quick access to it. Let me know if you need help with modifying the script in any way!
User avatar

2020-10-16 14:19:55

Works great, thanks a lot! I knew there was a way to script this but never got around to actually write the script.

How does the 'compression factor' property work? If I need maximum quality, do I need to set it to 100 or to 0?
User avatar

2020-10-16 14:26:10

100 is max quality, I guess 'compression factor' isn't the best term to use under those circumstances...
User avatar

2020-12-29 15:04:58

Yes we need this :) save for web batch :) "All open files " is great in other software :D
User avatar

2021-04-11 10:50:01

Hi Andrius,

Thanks so much for the Apple Script. Very handy indeed for what I'm doing on a regular basis! Just one thing. After I batch export all the tabs I have open, the tabs within Pixelmator Pro all close themselves down. What I would like is for the tabs to remain open as they were after the images have been exported. Is this possible with a change to the script? I did try simply removing the "close the front document without saving" line in the script but when I ran the script, it only exported one single image (the tab that was selected).

Thanks,
Andy
User avatar

2021-04-12 16:08:32

This is a little tricky because there's no way to navigate open tabs using the Pixelmator Pro AppleScript dictionary, but you can achieve it using the "Show Next Tab" menu command (by adding a keyboard shortcut to the script). Here's what that would look like:
tell application "Pixelmator Pro"
	set exportLocation to choose folder with prompt "Please choose the location you'd like to export the images:"
	repeat (number of documents) times
		export the front document to ((exportLocation as text) & (name of the front document) & ".jpg") as JPEG with properties {compression factor:85}
		tell application "System Events"
			keystroke (ASCII character 9) using control down
		end tell
	end repeat
end tell
Hope that helps!
User avatar

2021-04-13 05:47:23

by Andrius This is a little tricky because there's no way to navigate open tabs using the Pixelmator Pro AppleScript dictionary, but you can achieve it using the "Show Next Tab" menu command (by adding a keyboard shortcut to the script). Here's what that would look like:



Hope that helps!
It helped a lot! Works great!! Thanks so much for taking the time to post that, Andrius.
User avatar

2021-04-13 07:39:35

As ever, it's my pleasure! :pray:
User avatar

2021-08-03 22:42:12

Thanks for posting this script. It has saved me a lot of time and headache. There is one issue that would be great if it could be fixed. I'm getting an error after export is complete from the script error "Pixelmator Pro got an error: AppleEvent handler failed." number -10000"

I'm running O/S Big Sur 11.4

Is there anything I can do to fix this error so the script finishes its job and closes cleanly? Thanks!!!!
User avatar

2021-08-03 23:13:59

Wow, I just solved my own issue!!! I was viewing the tabs in the "view all Tabs" menu when I ran the script. If the script is run from just the regular tab UI view, it runs cleanly without error!!!!!!!!
User avatar

2021-08-26 07:00:58

a batch utility for raw photos is soooooo needed, I requested a long time ago, but the team said me that is working on ML Crop 🤦🏻‍♂️ the app is lighter but when you open 30 raw photos, the app it freezes
User avatar

2021-09-03 10:21:37

by Reggie 2021-08-26 04:00:58 a batch utility for raw photos is soooooo needed, I requested a long time ago, but the team said me that is working on ML Crop 🤦🏻‍♂️ the app is lighter but when you open 30 raw photos, the app it freezes
Right now, Pixelmator Pro as a standalone app, indeed, does not handle such workflows very well. That said, there are still options for using Pixelmator Pro to edit multiple RAW images without having to import them directly. For instance, if you have all your RAW images in the Photos library, you can edit them using the Pixelmator Pro photos extension — no import needed.

With macOS Monterey, we'll also be introducing 24 different Pixelmator Pro actions to the macOS Shortcuts app. Again, Shortcuts will let you process the RAW images without launching Pixelmator Pro. There's a Pixelmator Pro beta with Shortcuts support already available from TestFlight in case you're already running macOS 12 beta and would like to try it out.

Finally, we plan to bring Pixelmator Photo to Mac at some point down the line which, hopefully, will open more opportunities for handling large volumes of large RAW files more efficiently.
User avatar

2021-10-19 02:04:38

Yes, need this to export both .jpeg and .tiff and also the possibility to add the filename with date and such things like Silkypix. Also a rename file function without opening the files. Just add date and such things to the original filename
User avatar

2022-11-23 09:46:45

Hi, I just bought Pixelmato Pro 3.1.1 and saw this thread in the community. I am very interested in converting a batch of jpg images to webp. I have used the script indicated at the beginning of the topic and it works very well but it only converts two images even though I have 3, 4 or 5 images open. Is there any possibility to convert more than two images? Thank you, I am very happy with Pixelmator.
User avatar

2022-12-09 18:38:04

Just want to revive this to ask how i can add 'convert to color profile sRGB' command to the original script above?
Plus, is there any plan at all to include a batch export command to the app itself ...seems like it would not be such a difficult task to incorporate this since it can already be added as a script.
Thanks
User avatar

2023-06-06 01:01:40

by Andrius but you can achieve it using the "Show Next Tab" menu command (by adding a keyboard shortcut to the script).
LOL, thank you so much for this script, it saved me a lot of hassle. But I had a laugh, because as it was running, I flipped over to Finder to see what it was doing and the "Show Next Tab" command started hopping between Finder windows. I thought I was going crazy and then realized the command acts on whatever is focused at the time the script gets there.

As I said, thanks!
User avatar

2023-09-01 17:53:04

by komsos Hi, I just bought Pixelmato Pro 3.1.1 and saw this thread in the community. I am very interested in converting a batch of jpg images to webp. I have used the script indicated at the beginning of the topic and it works very well but it only converts two images even though I have 3, 4 or 5 images open. Is there any possibility to convert more than two images? Thank you, I am very happy with Pixelmator.
Yes, this could happen when your image is large or complicated to process. It takes time for Pixelmator to switch to another "front document" in such situations, while the script assumes the previous work is already done and rushes to the next saving. Some files may be skipped or overwritten in this case. All you need to do is add some delay after switching documents so Pixelmator can finish the task before the next export. This delay may vary depending on the complexity of your work, complex tasks or high-quality images may need a longer delay.
tell application "Pixelmator Pro"
	set exportLocation to choose folder with prompt "Please choose the location you'd like to export the images:"
	repeat (number of documents) times
		export the front document to ((exportLocation as text) & (name of the front document) & ".png") as PNG with properties {compression factor:100}
		tell application "System Events"
			keystroke (ASCII character 9) using control down
		end tell
		delay 0.5
	end repeat
end tell
User avatar

2023-11-05 15:19:19

by TerryX Yes, this could happen when your image is large or complicated to process. It takes time for Pixelmator to switch to another "front document" in such situations, while the script assumes the previous work is already done and rushes to the next saving. Some files may be skipped or overwritten in this case. All you need to do is add some delay after switching documents so Pixelmator can finish the task before the next export. This delay may vary depending on the complexity of your work, complex tasks or high-quality images may need a longer delay.
This was so helpful! Thank you!!