A picture editor is sensible when I’m engaged on one picture. It stops making sense when a script has to resize 2 hundred screenshots, create a QR code for each machine, take away metadata earlier than publishing, and rebuild the identical report graphic subsequent week.
I created ImagePlayground for these repeatable jobs. The module covers 4 areas that usually meet in the identical automation:
- processing current photographs
- creating and studying QR codes and barcodes
- inspecting and controlling picture metadata
- composing charts, topology, report graphics, and visible tales
The instructions are solely half of the worth. The picture dimension, crop, metadata coverage, chart information, and output format stay within the script, so the subsequent run produces the identical type of asset with out counting on somebody remembering the enhancing steps.
Earlier than you begin
Use PowerShell 7 and set up the present public modules used for this text:
Set up-Module ImagePlayground -Scope CurrentUser -Drive
Import-Module ImagePlayground
Run the examples from a folder the place you may write the generated recordsdata. Change the pattern paths and information with your individual after the primary profitable run.
Begin with the job, not the file format
I usually begin with the end result I want. If the job is “make this picture 1200 pixels large,” a centered command reminiscent of Resize-Picture is sufficient. If a number of adjustments belong collectively, I load the picture as soon as, apply the operations, and save on the finish. Cropping, rotation, watermarks, textual content, mosaics, thumbnails, conversion, blur, sharpening, and different changes can all take that route.
Resize-Picture `
-FilePath '.sourcecompany-logo.png' `
-OutputPath '.publishcompany-logo-300.png' `
-Width 300
As a result of solely the width is equipped, the facet ratio is preserved. That’s what I normally need when the supply folder accommodates a mixture of panorama and portrait photographs.
Create the output folder earlier than operating the instance and use one among your individual supply photographs. For a publishing job, test the size in code and have a look at a couple of consultant outcomes. A file can have the anticipated width and nonetheless be a poor crop.
Codes belong in automation too
QR payloads are one other place the place a small guide activity rapidly turns into an automation drawback. ImagePlayground can create and skim normal QR content material, and it has typed instructions for Wi-Fi, contacts, calendars, e-mail, OTP, funds, areas, telephone numbers, and SMS. I might moderately cross a community title and password than hand-build the encoded Wi-Fi string in each script.
$guestPassword = 'Instance-Solely-Change-Me'
New-ImageQRCodeWiFi `
-SSID 'Contoso-Visitor' `
-Password $guestPassword `
-FilePath '.publishguest-wifi.png'
$decoded = Get-ImageQRCode -FilePath '.publishguest-wifi.png'
The password above is fictional. The generated QR code accommodates the true community password in readable type, so use a guest-network credential and deal with the picture like the key it accommodates. I additionally learn the code again after era and once more after any resize or composition step. That catches a visually believable picture that now not scans.
A picture could carry timestamps, digicam particulars, location, writer data, and different EXIF metadata that by no means seems on display screen. I don’t need a publishing workflow to imagine that one other utility eliminated it.
ImagePlayground can examine, export, import, replace, and take away metadata, which makes the choice seen within the script.
A wise publishing move is:
- examine or export metadata
- determine which fields are required
- take away or replace the rest
- examine the end result once more
- publish the verified output
Eradicating all the things isn’t all the time appropriate. Some property ought to preserve copyright or provenance fields, whereas others ought to depart the group with a intentionally small metadata set. The second inspection proves which coverage was utilized.
From particular person photographs to report visuals
ImagePlayground additionally handles graphics that start as information moderately than pixels: charts, chart grids, KPI blocks, fixed-size canvases, group hierarchies, topology maps, and longer visible tales.
The rendering work comes from ChartForgeX. ImagePlayground turns these .NET fashions into PowerShell instructions, parameter units, packaging, and examples. I preserve that cut up as a result of enhancements to format and SVG/PNG rendering ought to profit .NET functions and PowerShell scripts on the identical time.
Here’s a compact chart definition that may be written to PNG, SVG, or HTML by altering the output path:
$sequence = @(
New-ImageChartLine -Identify 'CPU' -Worth 31,42,37,55,68,61,74 -Colour DeepSkyBlue -Marker Circle -Easy
New-ImageChartLine -Identify 'Reminiscence' -Worth 48,51,55,57,60,62,59 -Colour MediumSeaGreen -Marker Circle -Easy
)
New-ImageChart `
-Definition $sequence `
-Theme Darkish `
-ShowGrid `
-XTitle 'Pattern' `
-YTitle 'Utilization %' `
-FilePath '.publishresource-trend.svg' `
-Width 760 `
-Top 420
Group and topology instructions observe the identical sample: map PowerShell information into a visible mannequin, then render it. A crowded department can use a compact format with out altering the entire group chart. A canvas can mix textual content, charts, photographs, shapes, and reusable blocks for a report cowl, e-mail graphic, wallpaper, or social preview.
Static first, interplay when it helps
For e-mail, paperwork, and construct artifacts, I begin with static output. SVG retains textual content and geometry sharp; PNG works virtually in every single place. HTML is accessible when the end result belongs in a browser, whereas GIF or APNG can carry a brief animation when movement explains one thing helpful.
Interactivity is elective. A chart included in a weekly report ought to render accurately with no browser runtime.
The place to go subsequent
The ImagePlayground undertaking hub brings the documentation and examples into one place:
If the automation is already written in PowerShell and the output is a picture or visible asset, begin with ImagePlayground. If a .NET utility owns the mannequin, use ChartForgeX straight. Each paths finish in the identical renderer, which is strictly why I constructed them to work collectively.


