Create a new file with current file contents merged into a single pixel layer.
use scripting additions
set _file to ((path to desktop as text) & "Temp.png")
tell application "Pixelmator Pro"
export the front document to file _file as PNG
tell application "Finder"
delete file _file