Public
Like
untitled-1613
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data โ all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v9View latest version
This HTTP endpoint accepts image uploads and adds a centered "wumbo" box overlay to the image.
- ๐ผ๏ธ Accepts any image format (PNG, JPEG, GIF, etc.)
- ๐ฆ Adds a centered white box with "wumbo" text
- ๐จ Responsive box sizing based on image dimensions
- ๐พ Automatic download of processed image
- ๐ Simple web interface for testing
- Visit the endpoint URL in your browser
- Upload an image using the form
- Click "Process Image"
- The processed image will automatically download
Send a POST request to /process with the image as form data:
curl -X POST \ -F "image=@your-image.jpg" \ https://your-val-url.web.val.run/process
- Upload: Image is uploaded via multipart form data
- Processing: Client-side Canvas API processes the image:
- Draws the original image
- Calculates center position
- Adds a white box with shadow
- Renders "wumbo" text in the center
- Download: Processed image is automatically downloaded as PNG
- Framework: Vanilla JavaScript with HTML5 Canvas
- Input: Any image format supported by browsers
- Output: PNG format with "wumbo" box overlay
- Box styling:
- White background with 95% opacity
- Dark border (3px)
- Drop shadow effect
- Responsive sizing (max 250x100px, scales with image)
- Validates file type (must be image)
- Handles image loading errors
- Provides user feedback for all operations