Mosaic Mosaic
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Mosaic

Started by Stramm, July 08, 2008, 07:08:12 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Stramm

This plugin lets you create a photomosaic ( http://en.wikipedia.org/wiki/Photomosaic ). It uses the google library phpmosaic ( http://code.google.com/p/phpmosaic/ ).

This plugin is very resource hungry. Therefore you can override memory_limit and timeout (if you don't make use of the safe mode).

How to get started:
1. Install the plugin.
2. Check settings and modify them to your needs
3. Build an index (needs some time, depending on your server - you may want to do that album by album - if you've created an index for a pic, then you'll have to clear the entire index db [click clear], to remove it. If an index already exists for an image, creating the indexes again for that album would skip this image)
Try to have as many indexed images as possible for the best result.
Try to have pics with different colors (also extremes)
4. In the intermediate view below the pic you'll see a 'Build mosaic button' - click it and the process starts (may take its time). When finished, the button gets replaced with a download link

Settings:
Click the mosaic button in the admin menu to go to the mosaic config menu
- Enable mosaic: ( function disabled atm cause of the next setting)
- Only admin can create mosaics: if you want your users not to take heat on your box
- Resize option: when creating the thumbs to be used for the mosaic, the get resized. Here you can set how this has to be done... options - cut   |  ignore  |   deform
- Thumbnail width: width of the thumb to be used for the mosaic
- Thumbnail height: height of the thumb to be used for the mosaic
- Time Limit in seconds (0 = unlimited) (only if safemode = off) : default 0
- Memory Limit in Megabyte, auto doesn't change the default set by php.ini (only if safemode = off): 'auto' as siad uses the php.ini setting, use eg. 8, 16, 32, 64, 128... 512 etc. depending on your server
- Thumbnail limit for mosaic image creation process (0 = unlimited) maximum number of thumbnails in mosaic-image: default 7500; if you set the other options to high, this may not be enough thumbs and you need to increase it (but then you need more memory, too)
- How many pixel together get replaced by a thumb (0 = auto calculation): auto calc makes 32 thumbs fit in the source images width. The lower you set this, the more thumbs you need (better result, but a lot more CPU + mem is needed)
- Distance same thumbs must have at minimum (0 = each thumb only once per image): This number sets the distance the same thumbs must have in x,y. If you set it eg. to 4, then the same thumbs have at least 4 other images between them in x and y dimension. If you do not have that much indexed images, then it may be good, to set this to 1
- Jpeg quality of the mosaic image : That's of course the quality used to save the final image


[Edit GauGau 2010-03-05]
This plugin has been added to the subversion repository: http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.4.x/plugins/

It has been updated as well to reflect the version checking routines in the plugin manager that are meant to make sure that galleries don't break because of plugins installed that aren't meant for that particular version of the gallery.

Download: https://sourceforge.net/projects/coppermine/files/Plugins/1.4.x/cpg1.4.x_plugin_mosaic_v1.1.zip/download
[/Edit]

Stramm

Here a sample result

Pascal YAP

#2
WoW Cool  ;D

Here is an other sample  ;)
Do you remenber this old Avatar in this example  :) ?

Toddsc

is this working on 1.4.25?  I get this error:

Parse error: syntax error, unexpected T_CLASS in /home/nwjpb02/public_html/photos/plugins/mosaic/mosaic_include.php on line 12

Also, the instructions have say to build an index, is that an option when you click Mosaic normally?

Thanks!

Todd

Joachim Müller

If you get a parse error your file got corrupt. Get a fresh copy. Extract it properly. Make sure not to use any editors that are not designed to edit PHP files. Do as suggested per board rules!

Toddsc

PHP 5 was disabled on my server, sorry, it's working now.  :)

Joachim Müller

@Stramm: does this plugin require PHP 5? Does it not work with PHP 4?

Stramm

Yes, the mosaic class requires PHP 5.

tinorebel

I just tryed this plug in on my gallery and I'm really Impressed.
Working fine from the first try. :D

I have a gallery with 1000 images all vertical and the final effect is great!
I have images of 600 pix, so I have setted mosaic to use a thumb each 10 pixels: meaning the mosaic comes out from a 60 x 90 matrix with 5400 thumbs!

Can take a look if you like here:
http://www.milfalleros.info/fotos

Is there a way to reduce the size of the mosaic download?
Or is there a way I can allow to build and download only registred users?

Thanks! :)
Live long and prosper!
www.tripodart.net