Migration Guide
Guide for migrating from Adobe ColdFusion or Lucee image functions to BoxLang Image Module.
Guide for migrating from Adobe ColdFusion or Lucee image functions to BoxLang Image Module.
Table of Contents
Compatibility Overview
The BoxLang Image Module aims for high compatibility with Adobe ColdFusion and Lucee image functions. Most code should work with minimal or no changes.
Compatibility Matrix
ImageNew()
✅
✅
✅
Full compatibility
ImageRead()
✅
✅
✅
Full compatibility
ImageWrite()
✅
✅
✅
Full compatibility
ImageResize()
✅
✅
✅
Full compatibility
ImageRotate()
✅
✅
✅
Full compatibility
ImageCrop()
✅
✅
✅
Full compatibility
ImageFlip()
✅
✅
✅
Full compatibility
ImageBlur()
✅
✅
✅
Full compatibility
ImageSharpen()
✅
✅
✅
Full compatibility
ImageGrayScale()
✅
✅
✅
Full compatibility
ImageNegative()
✅
✅
✅
Full compatibility
ImageOverlay()
✅
✅
✅
Full compatibility
ImagePaste()
✅
✅
✅
Full compatibility
ImageAddBorder()
✅
✅
✅
Full compatibility
ImageScaleToFit()
✅
✅
✅
Full compatibility
ImageDrawLine()
✅
✅
✅
Full compatibility
ImageDrawRect()
✅
✅
✅
Full compatibility
ImageDrawOval()
✅
✅
✅
Full compatibility
ImageDrawText()
✅
✅
✅
Full compatibility
ImageSetDrawingColor()
✅
✅
✅
Full compatibility
ImageGetExifMetadata()
✅
✅
✅
Full compatibility
ImageGetIPTCMetadata()
✅
✅
✅
Full compatibility
ImageInfo()
✅
✅
✅
Full compatibility
IsImage()
✅
✅
✅
Full compatibility
IsImageFile()
✅
✅
✅
Full compatibility
Member Functions
✅
✅
✅
CF11+, Lucee 4.5+
Image Component
✅
✅
✅
<cfimage> → <bx:image>
CAPTCHA
✅
✅
⚠️
Planned for future release
ImageFilter()
✅
⚠️
⚠️
Planned for future release
ImageXOR()
✅
⚠️
⚠️
Planned for future release
Legend:
✅ Fully supported
⚠️ Partial support or planned for future release
❌ Not supported
Syntax Differences
BIF vs Member Functions
Both Adobe ColdFusion (11+) and Lucee support member function syntax. BoxLang maintains this compatibility:
Adobe CF / Lucee / BoxLang (all compatible):
No changes needed - both syntaxes work identically in BoxLang.
Component Tag Syntax
The main difference is the tag prefix:
Adobe ColdFusion / Lucee:
BoxLang:
Migration: Simple find/replace: <cfimage → <bx:image
Function Mapping
Most functions have identical names and signatures between platforms:
Direct 1:1 Mappings
These functions work identically in CF, Lucee, and BoxLang:
ImageNew()
✅
✅
✅
No changes
ImageRead()
✅
✅
✅
No changes
ImageWrite()
✅
✅
✅
No changes
ImageResize()
✅
✅
✅
No changes
ImageRotate()
✅
✅
✅
No changes
ImageCrop()
✅
✅
✅
No changes
ImageFlip()
✅
✅
✅
No changes
ImageBlur()
✅
✅
✅
No changes
ImageSharpen()
✅
✅
✅
No changes
ImageGrayScale()
✅
✅
✅
No changes
ImageNegative()
✅
✅
✅
No changes
ImagePaste()
✅
✅
✅
No changes
ImageCopy()
✅
✅
✅
No changes
ImageGetWidth()
✅
✅
✅
No changes
ImageGetHeight()
✅
✅
✅
No changes
ImageInfo()
✅
✅
✅
No changes
Parameter Differences
ImageNew()
Adobe CF:
BoxLang:
Migration: Remove empty string first parameter (optional).
ImageRotate()
All platforms support the same syntax:
No changes needed.
ImageResize()
Adobe CF / Lucee:
BoxLang:
Migration: "highestQuality" → "highQuality" (or use "bicubic").
Interpolation values:
"nearest"
"nearest"
No change
"bilinear"
"bilinear"
No change
"bicubic"
"bicubic"
No change
"highestQuality"
"highQuality"
Name difference
"highQuality"
"highQuality"
No change
"mediumQuality"
"bilinear"
Use bilinear
"highestPerformance"
"nearest"
Use nearest
Component Differences
Component Name
Adobe CF / Lucee:
BoxLang:
Supported Actions
border
✅
✅
✅
No changes
captcha
✅
✅
⚠️
Planned
convert
✅
✅
✅
No changes
info
✅
✅
✅
No changes
read
✅
✅
✅
No changes
resize
✅
✅
✅
No changes
rotate
✅
✅
✅
No changes
write
✅
✅
✅
No changes
writeToBrowser
✅
✅
✅
No changes
Action-Specific Attributes
Most attributes are identical across platforms:
Read:
Resize:
Write:
Known Limitations
Not Yet Implemented
These features exist in Adobe CF/Lucee but are planned for future BoxLang releases:
CAPTCHA generation -
<bx:image action="captcha">not yet availableImageFilter() - Custom Java filter application
ImageXOR() - XOR blending operation
ImageSetAlpha() - Alpha channel manipulation (use
setDrawingTransparency()as alternative)
Platform-Specific Differences
Font Rendering
Font rendering may vary slightly across platforms/OS:
Solution: Test font output on target platform, use web-safe fonts.
Color Models
BoxLang supports standard color models:
RGB
✅
✅
✅
ARGB
✅
✅
✅
Grayscale
✅
✅
✅
CMYK
⚠️
❌
❌
Migration: Convert CMYK images to RGB before processing.
Migration Checklist
Pre-Migration Assessment
Migration Steps
Replace component tags:
Update interpolation values:
Test CAPTCHA alternatives: If using CAPTCHA, implement alternative until BoxLang support is added:
Verify font rendering: Test text drawing on target platform:
Test metadata extraction: EXIF/IPTC should work identically:
Post-Migration Testing
Common Migration Patterns
Pattern 1: Simple Resize
Adobe CF / Lucee:
BoxLang (no changes):
Pattern 2: Thumbnail with Crop
Adobe CF / Lucee:
BoxLang (no changes):
Pattern 3: Member Function Chaining
Adobe CF 11+ / Lucee 4.5+:
BoxLang (no changes):
Pattern 4: Watermarking
Adobe CF / Lucee:
BoxLang (no changes):
Pattern 5: Component Usage
Adobe CF / Lucee:
BoxLang (tag name change only):
Pattern 6: EXIF Metadata
Adobe CF / Lucee:
BoxLang (no changes):
Advanced Migration
Custom Image Processing Pipeline
Adobe CF / Lucee:
BoxLang (change interpolation only):
Batch Processing
Adobe CF / Lucee / BoxLang (identical):
Performance Considerations
Memory Usage
All platforms handle images similarly:
Optimization Tips
Same best practices apply across all platforms:
Resize early: Reduce dimensions before heavy processing
Reuse images: Copy instead of reloading
Chain operations: Use member functions for cleaner code
Format selection: Use JPEG for photos, PNG for graphics
Quality settings: Balance file size vs. quality
Troubleshooting
Common Issues
Issue: "Function not found"
Cause: Typo in function name
Solution: Check function spelling (case-insensitive but verify)
Issue: "Invalid image object"
Cause: Passing variable name instead of image object
Solution: Pass actual image object
Issue: Font rendering differs
Cause: Platform/OS font differences
Solution: Use web-safe fonts, test on target platform
Additional Resources
BoxLang Documentation - Core BoxLang language reference
Adobe ColdFusion Image Functions - Original CF documentation
Lucee Image Functions - Lucee image function reference
Getting Started Guide - BoxLang image basics
BIF Reference - Complete function reference
Advanced Examples - Real-world use cases
Summary
Migration Complexity: Low
Most Adobe ColdFusion and Lucee image code will work in BoxLang with minimal or no changes:
✅ No changes needed:
BIF function names and signatures
Member function syntax
Parameter order and types
Return values
EXIF/IPTC metadata extraction
Drawing operations
Color handling
⚠️ Minor changes:
Component tags:
<cfimage>→<bx:image>Interpolation:
"highestQuality"→"highQuality"
❌ Not yet available:
CAPTCHA generation
ImageFilter()
ImageXOR()
Migration time estimate: 1-2 hours for typical applications.
Next Steps
Getting Started - Learn BoxLang image basics
BIF Reference - Complete function reference
Advanced Examples - Real-world patterns
Last updated
Was this helpful?
