NAME
App::BlurFill::Web - The web interface to App::BlurFill
SYNOPSIS
# In a PSGI environment
use App::BlurFill::Web;
App::BlurFill::Web->to_app;
DESCRIPTION
App::BlurFill::Web is a web interface for the App::BlurFill module. It allows users to upload an image file, specify the desired width and height, and receive a blurred image file in response.
ROUTES
GET /
This route displays a web form where users can upload an image and specify the desired width and height for the output. The form submits to the POST /blur route.
POST /blur
This route accepts an image file upload and optional width and height parameters. It processes the image and returns an HTML page displaying the blurred image with a download link and an option to create another image.
GET /download/:filename
This route serves the processed image file for download. The filename parameter should match a previously processed image stored in the temporary directory.
PARAMETERS
image
The image file to be processed. This parameter is required. It should be a valid image file format (e.g., JPEG, PNG, GIF).
width
The desired width of the output image. Default is 650 pixels.
height
The desired height of the output image. Default is 350 pixels.
EXAMPLE
POST /blur
Content-Type: multipart/form-data
image: <binary image data>
width: 800
height: 600
Using curl
# This will return HTML with the results page
curl -X POST -F "image=@path/to/image.jpg" -F "width=800" -F "height=600" http://localhost:3000/blur
# To download the image directly
curl -OJ http://localhost:3000/download/image_blur.png
RESPONSE
The POST /blur response will be an HTML page displaying the blurred image with download options. The GET /download/:filename response will be the actual image file.
AUTHOR
Dave Cross <dave@perlhacks.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2025, Magnum Solutions Ltd. All rights reserved.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.