top
logo
English (United Kingdom)Italian (Italy)


Image Rendering Filter

AMFImageRendering

this feature has the goal to help to manage the images for different types of devices , you must only make one images (in high definition is better) into the directory where you have defined the Filter for example /mobile.

From v3.22 version support  transperency images for png files.

From v3.30 version support gif animated images.

Is the ideal for make mobile ads or mobile images album.

In this directory you will put all the images you want to convert. Every time a device do a request in that particular URI for example /mobile/logo.png the filter read the width of the device from WURFL and resize the image and save it into the directory that you have defined in "ResizeImageDirectory". If another device with same capability do the same request, the image is take it directly to file system.

Image Filter Test Page: http://www.apachemobilefilter.org/test/AMFImageRendering.php or http://www.apachemobilefilter.org/test/AMFImageRendering_gifanimated.php

This is an example of images you can have:

Samsung SGH-i780 or iPhone (320x38)

Blackberry 8800 (315x38)

Nokia N73(229x27)

Configuration:

Prerequisite: AMFWURFFilter or AMFWURFLFilterMemcached must be installed

Open the file httpd.conf of your webserver. And configure this few parameter:

PerlSetEnv AMFMobileHome /server_root/MobileFilter

#This indicate to the filter where put the transformated images (cache directory) this directory must be writeable
PerlSetEnv ResizeImageDirectory /tmp/cached

PerlModule Apache2::AMFWURFLFilter
PerlTransHandler +Apache2::AMFWURFLFilterMemcached

#This is indicate to the filter were are stored the high definition images

<Location /mobile/*>
SetHandler modperl
PerlOutputFilterHandler Apache2::AMFImageRendering
</Location>

HTML Syntax

The image is scaled to the size of the witdth of the mobile devices:

<img src="/mobile/logo.png">

The image is scaled to the 50% of the width of the mobile devices:

<img src="/mobile/logo.png?dim=50">

The width of the image is 80px:

<img src="/mobile/logo.png?width=80">

For change the name of parameter “width” and “dim” in httpd.conf must be setted:
PerlSetEnv ImageParamWidth <new name of param>
PerlSetEnv ImageParamPerc <new name of param>

By default the images that have a width less than device screen size are not resized, if you want to force it:

PerlSetEnv ResizeSmallImage true
 

You can build your page (in WML, CHTML or XHTML) like illustrated in this example

Comments (2)
  • kumaraswamy  - Image Rendering
    I did a lot R&D for image rendering on the fly for one of my mobile website and finally it was ended up with Apache-mobile Filter. It was nice tool and easy to adopt. I simply Love it. I appreciate idle effort for this tool. Thanks for providing such a nice tool Idel
  • MasterBoy
    You just gave me a great idea. Thanks for the post, it's really helpful for me!
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
Security
Please input the anti-spam code that you can read in the image.
 

Newsletter




AMF Activity

SourceForge.net - Recent activity for project: mobilefilter
Recent activity for the project mobilefilter

bottom
top

Mobility Site

WMLProgramming

Mobile Monday


bottom

IF sas di Idel Fuschini & C. P.IVA: 09659851001
Powered by Joomla!. Designed by: Free Joomla Themes, hosting. Valid XHTML and CSS.