meta données pour cette page
Différences
Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
dokuwiki:about-photos [2012/03/09 07:03] ztrulphcs créée |
— (Version actuelle) | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== about photos at free.fr ====== | ||
- | How Dokuwiki can handle photos at free.fr ? I made some experiment to discover. | ||
- | |||
- | I made a media namespace called stupid-photos with photos from two cameras : my iphone 3gs and a canon camera. | ||
- | |||
- | The directory contains | ||
- | |||
- | * 42 photos from the iphone | ||
- | * named img_0*jpg. | ||
- | * dimension : 2048x1536 | ||
- | * smallest photo : ~ 580kb | ||
- | * biggest photo : ~ 2Mb | ||
- | * mean size : ~ 1.4 Mb | ||
- | * 29 photos from the canon camera, | ||
- | * named img_2*jpg | ||
- | * dimension 4320x3240 | ||
- | * smallest size : ~ 2.8Mb | ||
- | * biggest size : ~ 5.5Mb. | ||
- | * the mean size : ~ 3.6Mb | ||
- | |||
- | ===== Try to insert one photo while editing a page ===== | ||
- | |||
- | Let's click on the //insert media button// and see what happens. | ||
- | |||
- | Most photos from the iphone are absolutely not recognised at all. Some are just ignored. Here is what I get : | ||
- | {{: | ||
- | |||
- | |||
- | Photos from the canon camera are slow to come, but they appear. Note that some of them don't appear entirely. probably because php timed out while the download is in progress. Here is what I can see : | ||
- | {{ : | ||
- | |||
- | So, as we all know, size doe not matter, but time does. | ||
- | |||
- | Take a look at this page to see 2 photos, one from each set. | ||
- | |||
- | |||
- | ===== Create a gallery ===== | ||
- | |||
- | I use the [[dw> | ||
- | |||
- | ===== Create a page with lots of photos ===== | ||
- | |||
- | I used //lorem ipsum// from [[http:// | ||
- | |||
- | <code awk create-bigfile-manyphotos> | ||
- | #! / | ||
- | BEGIN { | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | img[nimg++]=" | ||
- | } | ||
- | function mkresize() { | ||
- | if( rand() > 0.99 ) | ||
- | return ""; | ||
- | return "?" | ||
- | } | ||
- | function mkformat( | ||
- | zz=rand() | ||
- | base=" | ||
- | if( zz < 0.25 ) | ||
- | return " | ||
- | if( zz < 0.25 ) | ||
- | return "{{ " base " | ||
- | if( zz < 0.25 ) | ||
- | return " | ||
- | return "{{ " base "%s }}" | ||
- | } | ||
- | |||
- | |||
- | BEGIN { RS="" | ||
- | |||
- | { | ||
- | for( i = 1; i <= NF; ++i ) { | ||
- | k=rand() | ||
- | #printf "%s (%g) ", | ||
- | printf " | ||
- | if( "" | ||
- | image=img[int(rand() * nimg)] | ||
- | resize=mkresize() | ||
- | fmt=mkformat() | ||
- | printf fmt, image resize | ||
- | } | ||
- | printf " | ||
- | } | ||
- | printf " | ||
- | } | ||
- | |||
- | </ | ||
- | |||
- | This creates quite a big page with a lot a photos. :!: This page happens to be a bomb. Not only did it crash my firefox, but my gnome session was reduced to nothing as [[http:// | ||
- | |||
- | Be warned ! seeing the [[many-photos-source|source code]] is ok, seeing [[many-photos|the page]] itself might crash your session. |