Set(image ... ) command

Image view screen This command used to show images on screen of cell phone or upload icons and covers to the phone internal memory.

Format

Set(image,window,_image_file_name) or

ExecAndSet(image,window, ... command to determine image file name ...) or


Set(image,show|close|cursor|nocursor|dynamic_cursor|set_cursor) or


Set(image,icon,_icon_name_,_image_file_name_) or

ExecAndSet(image,icon,_icon_name_, ... command to determine image file name ...) or


Set(image,cover,_cover_name_,_image_file_name_) or

ExecAndSet(image,cover,_cover_name_, ... command to determine image file name ...) or


Set(image,remove,all|icons|covers)

Set(image,clear_cache)

Usage

Set(image,window ...)

Command Set(image,window,_image_file_name) used to show image on screen of cell phone. Of cource in most cases this should be ExecAndSet(...) variant of command. See cfg-example/Server-mode/winManager.cfg for details.

1=ExecAndSet(image,window,echo "$IMAGE_DIR/image.png")

Set(image,show)

Command Set(image,show) used to show previously uploaded image.

2=Set(image,show)

Set(image,close)

Command Set(image,close) used to close screen with image and return back to main screen.

3=Set(image,close)

Set(image,cursor|nocursor)

Note: Supported in J2ME client only

Command Set(image,cursor|nocursor) used to specify should or should not the cursor cross will be drawn over the image. If this option is set to "cursor" then it will be possible to move cursor cross with the joystick keys and if user pushes the joystick key, then two replies PressedX(x_coord,) and PressedY(y_coord,) will be sent. PressedX() event will be first one.

4=Set(image,nocursor)

Set(image,dynamic_cursor)

Note: Supported in J2ME client only

Command Set(image,dynamic_cursor) Is similar to Set(image,cursor), but each time user press joystrick key two replies PosX(x_coord,) and PosY(y_coord,) will be sent. PosX() event will be first one.

5=Set(image,dynamic_cursor)

Set(image,set_cursor ...)

Note: Supported in J2ME client only

Command Set(image,set_cursor, x_coord, y_coord) used to set cursor position on screen of cell phone.

6=Set(image,set_cursor,0,0)

To retrieve current cursor position use Get(cursor) command.

Set(image,icon ...)

Command Set(image,icon,_icon_name_,_image_file_name) used to upload 16x16, 32x32, 48x48, 64x64, 96x96 or 128x128 icons, which could be used in Set(icons,...) command. Of cource in most cases this should be ExecAndSet(...) variant of command. See cfg-example/Server-mode/iconUpload.cfg for details.

7=ExecAndSet(image,icon,echo "$IMAGE_NAME,$IMAGE_DIR/image.png")

Only 16x16, 32x32, 48x48, 64x64, 96x96 or 128x128 PNG icons could be uploaded. There is no way to show the list of uploaded icons.

All uploaded icons could be removed by Set(image,remove,icons) command.

All icons used by J2ME client cached in phone's memory. It is possible to cleanup that cache by Set(image,clear_cache) command.

Icon auto-uploading

anyRemote Android/J2ME clients supports icon auto-uploading. So, if there is a command

1=Set(icons,TheTitle,1,my-new-icon);

and my-new-icon.png is absent in Android/J2ME client, then anyRemote will search it in $HOME/.anyRemote/Icons/_icon_size_ and $(CfgDir)/Icons/_icon_size_ directories and automatially upload it to the phone if found (_icon_size_ can be 16, 32, 48, 64, 96 or 128).

It is not recommended to use this feature with J2ME client on Samsung phones because of terrible upload speed.

Set(image,cover ...)

Command Set(image,cover,_cover_name_,_image_file_name) used to upload cover images, which could be used in Set(cover,by_name,...) command. Of cource in most cases this should be ExecAndSet(...) variant of command.

7=ExecAndSet(image,cover,echo "my_cover,/tmp/cover_art.png")

For each connected client anyRemote will automatically scale cover to the appropriate size. It is possible to use command Get(cover_size) to determine appropriate size of cover image, but in general there are no needs to run this command explicitly because anyRemote executes it by itself upon connection to/from client.

There is no way to show the list of uploaded covers.

All uploaded covers could be removed by Set(image,remove,covers) command.

Cover auto-uploading

anyRemote Android/J2ME clients supports cover images auto-uploading. So, if there is a command

1=Set(cover,by_name,my-cover-art);

and my-cover-art.png cover image is absent in Android/J2ME client, then anyRemote will search it in $HOME/.anyRemote/Covers and $(CfgDir)/Icons/common directories and automatially upload it to the phone if found. anyRemote will scale cover image to appropriate size by itself. To work properly this feature needs to have ImageMagick installed.

It is not recommended to use this feature with J2ME client on Samsung phones because of terrible upload speed.

Also, it needs to use this feature with care if using Bluetooth connection.

Set(image,remove,all|icons|covers)

Command Set(image,remove,...) used to remove all previously uploaded icons or covers.

0=Set(image,remove,all)
1=Set(image,remove,icons)

Set(image,clear_cache)

Note: Supported in J2ME client only

Command Set(image,clear_cache) used to cleanup cache of used icons on J2ME client.

1=Set(image,clear_cache)

Retrieving size of the screen

To retrive size of the screen of the cellphone it is possible to use Get(screen_size) command.