Overview

SepiaEffectLib applies a warm, vintage sepia tone to images, wrapping the FireMonkey TSepiaEffect component. The adjustable intensity allows anything from a subtle warm tint to a full antique photograph look.

PropertyDetails
LibrarySepiaEffectLib
Prefixsepia_
WrapsTSepiaEffect
Functions12
TypeVisual effect (color)
CategoryCountDescription
Creation / Destruction2Create and free effect
Sepia Amount2Get/set intensity
Effect Control4Enabled and trigger get/set
Error Handling4Error codes and messages
📷 Vintage Photography: Sepia toning was originally a chemical process that gave early photographs their characteristic warm brown tone. This effect recreates that classic look digitally — perfect for nostalgic or retro aesthetics.

Cross-Platform Support

PlatformSupport
Windows✅ Full support
Linux✅ Full support
Android✅ Full support

Creation & Destruction

sepia#(parent#)

Creates a new sepia effect attached to the specified visual control.

ParameterTypeDescription
parent#PointerTarget visual control
ReturnsPointerEffect handle, or 0 on failure

sepia_free(effect#)

Destroys the effect and releases associated resources.

Error Handling

FunctionSignatureDescription
sepia_error()sepia_error@Returns last error code (0 = none)
sepia_errormsg$()sepia_errormsg$@Returns last error message
sepia_strerror$(code)sepia_strerror$@nConverts error code to text
sepia_clearerror()sepia_clearerror@Clears the error state

Sepia Amount

Controls the intensity of the sepia toning. At 0 the image is unmodified; at 1 the image has full sepia tone.

FunctionSignatureDescription
sepia_amount#(effect#, value)sepia_amount#@#nSet sepia intensity (0–1)
sepia_amount(effect#)sepia_amount@#Get sepia amount
ValueEffect
0.0No sepia (original colors)
0.2–0.4Subtle warm tint
0.5–0.7Moderate sepia (lightly vintage)
0.8–1.0Full antique photograph look

Effect Control

FunctionSignatureDescription
sepia_enabled#(effect#, value)sepia_enabled#@#nEnable (1) or disable (0)
sepia_enabled(effect#)sepia_enabled@#Gets enabled state
sepia_trigger#(effect#, trigger$)sepia_trigger#@#$Sets trigger string
sepia_trigger$(effect#)sepia_trigger$@#Gets trigger string

Complete Examples

Example 1: Adjustable Sepia

╯ sepia-slider.bas
let frm# = Pointer#(0)
let img# = Pointer#(0)
let sepia# = Pointer#(0)
let trkAmt# = Pointer#(0)
let lblAmt# = Pointer#(0)

frm# = form#("Sepia Control", 450, 400)

img# = image#(frm#)
image_bounds#(img#, 125, 30, 200, 150)
image_load#(img#, "https://picsum.photos/200/150")

sepia# = sepia#(img#)
sepia_amount#(sepia#, 0.5)

lblAmt# = label#(frm#, "Sepia Amount: 0.50", 50, 200)
trkAmt# = trackbar#(frm#)
trackbar_bounds#(trkAmt#, 50, 230, 350, 30)
trackbar_max#(trkAmt#, 100)
trackbar_value#(trkAmt#, 50)
trackbar_onchange#(trkAmt#, "OnAmount")

form_show(frm#)

function OnAmount(sender#) local a
  let a = trackbar_value(trkAmt#) / 100
  sepia_amount#(sepia#, a)
  label_text#(lblAmt#, "Sepia Amount: " + stri$(a, 2))
endfunction

Example 2: Before/After Comparison

╯ sepia-compare.bas
let frm# = Pointer#(0)

frm# = form#("Sepia Comparison", 500, 300)

' Original image
let img1# = image#(frm#)
image_bounds#(img1#, 50, 30, 180, 135)
image_load#(img1#, "https://picsum.photos/180/135")
let lbl1# = label#(frm#, "Original", 110, 175)

' Sepia image
let img2# = image#(frm#)
image_bounds#(img2#, 270, 30, 180, 135)
image_load#(img2#, "https://picsum.photos/180/135")
let sepia# = sepia#(img2#)
sepia_amount#(sepia#, 1)
let lbl2# = label#(frm#, "Sepia", 335, 175)

form_show(frm#)

Example 3: Full Sepia Effect

╯ basic-sepia.bas
let frm# = Pointer#(0)
let img# = Pointer#(0)
let sepia# = Pointer#(0)

frm# = form#("Sepia Effect Demo", 400, 350)

img# = image#(frm#)
image_bounds#(img#, 100, 30, 200, 150)
image_load#(img#, "https://picsum.photos/200/150")

sepia# = sepia#(img#)
sepia_amount#(sepia#, 1)

form_show(frm#)

Quick Reference

FunctionSignatureDescription
CREATION & DESTRUCTION
sepia#(parent#)sepia#@#Create effect
sepia_free(effect#)sepia_free@#Destroy effect
SEPIA AMOUNT
sepia_amount#(effect#, value)sepia_amount#@#nSet intensity (0–1)
sepia_amount(effect#)sepia_amount@#Get intensity
EFFECT CONTROL
sepia_enabled#(effect#, value)sepia_enabled#@#nEnable/disable
sepia_enabled(effect#)sepia_enabled@#Get enabled state
sepia_trigger#(effect#, trigger$)sepia_trigger#@#$Set trigger
sepia_trigger$(effect#)sepia_trigger$@#Get trigger
ERROR HANDLING
sepia_error()sepia_error@Last error code
sepia_errormsg$()sepia_errormsg$@Last error message
sepia_strerror$(code)sepia_strerror$@nCode to text
sepia_clearerror()sepia_clearerror@Clear error state

See Also

LibraryDescription
MonochromeEffectLibBlack and white conversion
HueAdjustEffectLibHue/color adjustment
ContrastEffectLibContrast adjustment