Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrAlreadyProcessed = errors.New("image appears to be already processed")
ErrAlreadyProcessed is returned when an image appears to already have the jewel case effect applied.
Functions ¶
func Process ¶
Process applies the jewel case frame and effects to the provided album art image. The input image is scaled and cropped to fit the frame, then various effects are applied based on the provided Options. Returns ErrAlreadyProcessed if the image appears to already be processed (unless opts.Force is true). Returns the final framed image.
func ProcessFile ¶
ProcessFile applies the jewel case effect to an image file and saves the result. Reads from inputPath, applies effects, and writes to outputPath. The output format is determined by the outputPath extension. Supports JPEG and PNG output formats.
Types ¶
type Options ¶
type Options struct {
// ColourCorrection applies subtle saturation and contrast reduction with a blue tint
ColourCorrection bool
// RoundedCorners applies randomly-sized rounded corners to the image
RoundedCorners bool
// EdgeSoftening applies alpha transparency to the edges for a softer look
EdgeSoftening bool
// RandomOffset applies a small random positional offset when placing the image in the frame
RandomOffset bool
// RandomRotation applies a subtle random rotation to the image
RandomRotation bool
// Reflection adds a diagonal white highlight to simulate light reflection
Reflection bool
// Force processes images even if they appear to already be processed
Force bool
}
Options controls which visual effects are applied to the album art.









