Skip to content

Instantly share code, notes, and snippets.

@kujirahand
Last active April 29, 2022 10:54
Show Gist options
  • Save kujirahand/716e5887ca56328c13abbfb55eb21ea3 to your computer and use it in GitHub Desktop.
Save kujirahand/716e5887ca56328c13abbfb55eb21ea3 to your computer and use it in GitHub Desktop.
Power Automateで画像を横向きに回転する
Display.SelectFolder IsTopMost: False SelectedFolder=> SelectedFolder ButtonPressed=> ButtonPressed
Folder.GetFiles Folder: SelectedFolder FileFilter: $'''*.jpg''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.NoSort SortDescending1: False SortBy2: Folder.SortBy.NoSort SortDescending2: False SortBy3: Folder.SortBy.NoSort SortDescending3: False Files=> Files
LOOP FOREACH CurrentItem IN Files
Scripting.RunPowershellScript Script: $'''[void][Reflection.Assembly]::LoadWithPartialName(\"System.Drawing\")
$im = New-Object System.Drawing.Bitmap(\"%CurrentItem%\")
$im.RotateFlip(\"Rotate270FlipNone\")
$im.Save(\"%CurrentItem%\", [System.Drawing.Imaging.ImageFormat]::Jpeg)
$im.Dispose()
''' ScriptOutput=> PowershellOutput ScriptError=> ScriptError
END
# [ControlRepository][PowerAutomateDesktop]
{
"ControlRepositorySymbols": [],
"ImageRepositorySymbol": {
"Name": "imgrepo",
"ImportMetadata": {},
"Repository": "{\r\n \"Folders\": [],\r\n \"Images\": [],\r\n \"Version\": 1\r\n}"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment