Reviews · ImageMagick

ImageMagick review: a transparent overlay needs an explicit JPG background

October 12 edition · Added October 13, 2026

By ToolBrivio Editorial

A creator sending a transparent overlay to an editor needs two different assets: the PNG for compositing and a readable preview for approval. Our small ImageMagick test produced both, but simply changing the filename extension to JPG gave the preview a black corner. Adding an explicit white background changed that corner to white. The distinction matters when a reviewer mistakes a dark preview for a problem in the source asset.

The source and the acceptance check

We used ImageMagick 6.9.12-98 Q16 on Linux, through the convert and identify commands. Hands-on testing took place on October 13, 2026. This is a narrow test of the installed version, not a claim about every release or image format. The fixture was an 80 × 40 transparent canvas containing a solid red rectangle from coordinates (20, 10) through (59, 29).

The success condition was a separate white JPG preview with the same dimensions and an unchanged PNG source. A second check examined what happens when a 2:1 image is resized into a nominal square. We chose a synthetic fixture so that the expected corner color and dimensions were unambiguous. It is deliberately not a portrait, photograph or typography test.

convert -size 80x40 xc:none -fill '#e63946'   -draw 'rectangle 20,10 59,29' overlay.png
convert overlay.png default.jpg
convert overlay.png -background white -alpha remove -alpha off white.jpg

All destinations were new files in a disposable test folder. These commands can replace a file already at the output path; choose a fresh path rather than running them over a client delivery. We inspected the output with identify and sampled the upper-left pixel with convert white.jpg -format '%[pixel:p{0,0}]' info:.

OutputDimensionsObserved cornerMeaning for delivery
Original PNG80 × 40TransparentKeep for compositing
Default JPG80 × 40srgb(0,0,0)Black preview corner in this test
White JPG80 × 40srgb(255,255,255)Explicit white preview corner

Why the explicit conversion is useful

A JPG cannot carry the source PNG’s alpha channel. The practical decision is therefore which solid surface the preview should show. In the tested command, -background white supplies the intended surface, -alpha remove composites the transparent pixels against it, and -alpha off removes the remaining alpha-channel handling before output. The white corner result verifies that this recipe did what we needed on the fixture.

That does not make the JPG an interchangeable replacement for the PNG. A preview with a white background will cover material underneath it if used as an overlay. Send both files with names that describe their jobs. A pair such as overlay-source.png and overlay-preview-white.jpg is more informative than final.png and final2.jpg.

The command-line interface is helpful when the same preview treatment must be repeated. The selected background is visible in the command, and the dimensions can be checked without opening another editor. It also puts the responsibility on the operator: there is no confirmation screen explaining that the delivery now has a solid background. Our observed black default corner is a reason to specify the background, not evidence that every JPG conversion always turns black.

A square request is not automatically a square result

convert overlay.png -resize '40x40' fit.png
convert overlay.png -resize '40x40!' stretch.png

The first output measured 40 × 20. It fit inside the requested 40 × 40 bounds while retaining the source proportions. The second measured 40 × 40 because the exclamation mark forced those dimensions. That made the rectangle’s proportions change with the canvas. Use quoted geometry strings in a shell, especially when they contain punctuation.

For an editor asking for a square delivery, these are different answers. A proportional fit alone leaves a rectangular file. Forcing a square changes the image’s shape. If the requirement is an undistorted square canvas, padding or cropping needs its own decision and verification; neither was evaluated in this review. We would not silently substitute forced dimensions just because the output number matches a brief.

The limits that affect this workflow

The tested build uses the ImageMagick 6 command name convert. Current ImageMagick documentation also uses the ImageMagick 7 entry point magick; this machine did not have that entry point. Check your installed version before copying commands. Our result should not be treated as a version comparison.

JPEG is lossy. Matching the corner and dimensions does not prove lossless color fidelity across a logo edge, semitransparent shadow or embedded profile. We did not measure compression quality, color management, metadata retention or large-image memory use. For a brand asset, inspect the actual edge and colors in the recipient’s target application as well. The 80 × 40 fixture does not predict performance on production footage thumbnails.

There is also no GUI workflow in this test. A reader uncomfortable with terminal commands may prefer an editor with a visible export dialog, particularly for a one-off delivery. ImageMagick is a good fit for this specific repeatable preview task when the operator can control filenames and inspect the results. Keep the transparent source and explicitly name the preview background before sending either file.

Reproduce and check the evidence

Download the test PNG, compare the default JPG and white JPG. For the handoff steps, use the separate delivery recipe. These are our generated fixtures, not vendor screenshots.

Primary references: ImageMagick command options, command processing and geometry, and ImageMagick 6 convert reference.

The ToolBrivio digest

Better software choices, in your inbox.

A weekly selection of software reviews and practical guides. Launching soon — leave your email to join the waitlist.