Geometric alignment with background-aware color matching
Click to upload
Click to upload
Aligning images...
POST to /api/align with multipart form data:
// JavaScript (fetch)
const formData = new FormData();
formData.append('source', sourceFile);
formData.append('target', targetFile);
formData.append('pp', '2'); // 0=none, 1=weak, 2=medium, 3=strong
const response = await fetch('/api/align', {
method: 'POST',
body: formData
});
const blob = await response.blob();
const url = URL.createObjectURL(blob);
// Or use /api/align/base64 for base64 response:
const response = await fetch('/api/align/base64', {
method: 'POST',
body: formData
});
const data = await response.json();
console.log(data.image); // data:image/png;base64,...