Given a php array of image names and path you will need to provide function and a module that creates a sigle mosaic image of the images combined.
The image file should be as small as posible and will have to maintain reasonable quality for web uses.
Having a changing array size as the number of images is changing, the fiollowing describes the structure of the images and number of images per row:
# of images = structure ROW1,ROW2,ROW3..... ROWn
1 image = 1
2 images = 2? ?
3 images = 1,2?
4 images = 2,2
5 images = 2,1,2
6 images = 3,3
7 images = 2,3,2
8 images = 3,2,3
9 images = 3,3,3
10 images = 3,2,2,3
11 images = 2,3,3,3
12 images = 3,3,3,3
All images should be scaled in memory to fit each other before placed into the mosaic.
Images are not to be scaled up in size - only to smaller size so the smallest image sets the size of all the other images.
returned mosaic image size max size is W pix wide H pix high in user setable paramters. The images used to create the mosaic need to have X pixels sapcing
? between them set by? user setable parameters.
The function will have 2 modes:
savetodisc mode - the image is saved as the function is called.
preview mode - the page will show 3 options of the image with 5% higher and lower quality.
The user will choose the image he likes. and the mozaic needs to be saved to disc to a specific name supplied to the function.
parameters.
If the image exists then _x should be added to the end of the image name before the file extension - where x is the number of the image if several images already exist....
The function parameters: (array, quality, spacing, watermark_path, output_image_width_max,
? output_image_height_max, preview_mode, destination_name)
The function returns the file name on success and null when image creation is unsuccessfull and debug info sent to log using the php error_log() function.