Skip to content

Image preprocessing

Preprocessing runs once on the source image, before any format is rendered. That is what keeps a watermark or a hue shift consistent across the whole kit — and it is also why a setting that looks fine on a 1080×1080 square can look wrong on a 2480×3508 print sheet.

The order of operations is fixed:

  1. Background removal
  2. Background colour / gradient fill
  3. Edge smoothing
  4. Noise reduction
  5. Auto-crop
  6. Colour operations — grayscale, B&W, invert, hue, temperature, saturation, brightness, contrast
  7. Sharpen or blur
  8. Vignette
  9. Drop shadow
  10. Watermark

Colour

ControlForm fieldDefaultWhat it does
GrayscalegrayscalefalseConverts to luminance, keeping the alpha channel
Black & whitebwfalseHard threshold to pure black and white — no midtones
InvertinvertfalseInverts RGB, leaves alpha alone
Hue shifthue_shift0Rotates hue in degrees, −180 to +180
Temperaturetemperature0Warm (positive, boosts red) to cool (negative, boosts blue), −100 to +100
Saturationsaturation1.00.0 is fully desaturated, 1.0 is unchanged, >1.0 boosts
Brightnessbrightness1.0Same scale as saturation
Enhance contrastenhance_contrastfalseApplies an autocontrast pass

Grayscale vs B&W

grayscale is what you want for a monochrome logo variant. bw is a hard threshold — useful for testing whether a mark survives being reduced to a stencil, rarely useful as a deliverable.

Sharpness and blur

ControlForm fieldDefaultNotes
SharpensharpenfalseUnsharp mask
Sharpen radiussharpen_radius1.0Larger radius, coarser halo
Blurapply_blurfalseGaussian blur
Blur radiusblur_radius2In pixels, at source resolution
Noise reductionnoise_reductionfalseMedian filter; needs OpenCV for the stronger path
Noise strengthnoise_strength1Integer; higher is more aggressive and softer
Enhance qualityenhance_qualityfalseCombined contrast + sharpness + colour pass

Sharpen and blur are mutually antagonistic — turning both on will apply both, in that order, and you will get a soft image with ringing. Pick one.

Composition

ControlForm fieldDefaultNotes
Auto-cropauto_cropfalseTrims uniform borders down to the content bounding box
Crop paddingcrop_padding10Pixels of margin left around the content after trimming
VignettevignettefalseDarkens the edges radially
Vignette strengthvignette_strength0.50.01.0

Auto-crop is the single most useful control here. If your logo has a lot of empty canvas around it, every format will render it small and lost. Auto-crop with 10–20 px of padding fixes that once, for all formats.

Drop shadow

ControlForm fieldDefault
Enableshadow_effectfalse
Opacityshadow_opacity0.3
Blur radiusshadow_blur4
Offset Xshadow_offset_x5
Offset Yshadow_offset_y5

The shadow is drawn from the alpha channel, so it only produces something meaningful on an image that actually has transparency — either a source PNG with an alpha channel or the output of background removal.

Watermark

ControlForm fieldDefault
Enableadd_watermarkfalse
Textwatermark_text© BrandKit
Opacitywatermark_opacity0.3

The watermark is rendered with Pillow's default bitmap font unless a TrueType face is available on the host, so it will look coarse on very large canvases. Set your own default text in config.json.

Output encoding

These two are not preprocessing — they apply at encode time, per generated file.

ControlForm fieldDefaultNotes
Qualityquality95JPEG and WebP only; PNG and ICO ignore it
Strip metadatastrip_metadatafalseDrops the ICC profile and remaining metadata from generated files

EXIF is always stripped from the upload

Regardless of the strip_metadata switch, the uploaded original is re-encoded through Pillow immediately on receipt, which discards EXIF — including GPS coordinates and camera serial numbers. strip_metadata controls the generated files only. See Privacy.

Changing the defaults

Every default above lives in preprocessing_options in config.json. Edit it there and the UI starts with your values.