Logo Logo en
  • iRidi Pro
    Основные компоненты
    • Приложение i3 Pro
    • iRidi Pro Server
    • iRidi Studio
    • iRidium studio v. 1.3.8 (устаревшая версия)
    Java Script в iRidi
    • Руководство
    • Справочник
    • Примеры
    • JS драйвера
    другие
    • Личный Кабинет
    • iRidium Cloud
    • iRidium Transfer
    • Push-уведомления
    • Лучшая практика
    Лицензирование
    • Лицензирование и передача проекта
    • Оффлайн-лицензирование
    • Активация iRidi Pro Server
  • Продукты
    i3 lite
    • Приложение i3 lite
    • Регистрация и лицензирование
    • Сервер
    • Модули
    KNX Home Server
    • Приложение i3 KNX
    • KNX Home Server
    BUS77 HOME SERVER
    • Приложения Bus77 Home и Bus77 Lite
    • Bus77 Home Server
    Решения
    • BYOD - решение для гостиниц
    • Портал жителя - решение для МКД
    iRidi SCADA
    • iRidi SCADA
  • Bus77
    НАСТРОЙКА BUS77
    • Основы Bus77
    • Приложения Bus77 Home и Bus77 Lite
    • Работа с драйвером Bus77 в iRidi Studio
    • Настройка шины Bus77 в iRidi Studio
    ПРОТОКОЛ BUS77
    • Характеристики CAN (Bus77)
    • Описание протокола
    • Исходники на GitHub
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
  • Поддерживаемое оборудование
    Драйверы
    • Список драйверов
    • ProAV драйвера
    • AV & Custom Systems
    • JS драйвера
    • Сторонние драйвера и фриланс
    Протоколы и интерфейсы
    • Голосовое управление
    • 1-Wire
    • BACnet IP
    • Bus77
    • KNX
    • KNX IP BAOS
    • Weinzierl kBerry
    • Microsoft Exchange
    • Modbus
    • MQTT
    • NFC
    • ODBC
    • Onvif
    • SIP
    • SNMP
    • Wake On Lan
    • Z-Wave
    • ZigBee
    Производители
    • AMX
    • AVCiT
    • Beckhoff ADS
    • Biamp Tesira
    • Bluesound
    • Casambi
    • BSS Harman
    • Clipsal
    • ControlArt 7Port
    • Crestron
    • DigiBird
    • Domintell
    • Duotecno
    • EIDE
    • EPSNET
    • Global Cache
    • HDL Buspro
    • Helvar
    • IEAST
    • INELS BUS
    • INELS Wireless
    • Intesis
    • Kleger
    • Kramer VIA
    • Kramer 3000
    • Larnitech
    • Legrand Netatmo
    • LG TV
    • Lutron
    • Lutron Homeworks QS
    • MyHome
    • Nest
    • Novastar
    • Panasоnic PTZ
    • Philips Dynalite
    • PJLink
    • Satel
    • SamsungTV
    • Sonos
    • Somfy
    • SpinetiX
    • Televic Conference
    • TIS
    • Tion
    • URRI
    • Velbus
    • Velocio
    • Vinteo
    • WyreStorm
    • WiiM
    • Xicato
    • Yamaha
    • ZONT
    • Z-Wave.me
    Протестированное оборудование
    • Панель HDL S57
    • Панель HDL S10
    • SIP-домофон
    • Akuvox
    • Arlight
    • Divus
    • QBic TD-1050 PRO
    • QBic TD-1060 Slim
    • QBic TD-1070
    • Sigur
    • Uni-Ubi
    • Velocio
  • Оборудование iRidi

    Серверы
    • HS Сервер
    • ProAV Control Processor Basic
    • ProAV Control Processor Advanced
    • Спецификация контроллеров UMC
    • Настройка контроллера UMC C2
    • Настройка контроллера UMC C3
    • Настройка контроллера HDL IntelliCenter 2 (UMC C4)
    Модули расширения
    • I-PX-RS1
    • I-PX-RS4
    • I-PX-IR3
    KNX
    • KNX Home Server
    • KNX IP Interface
    Панели управления
    • iRidium Panel 7
    • Touch Panel P3
    • Touch Panel P6
    • Touch Panel P8
    • Touch Panel P10
    • Tabletop Touch Panel 10
    • AV Remote Control
    ОБОРУДОВАНИЕ BUS77
    • Каталог Bus77 Pro
    • Каталог Bus77 Lite
    • Differences
iRidium mobile web-site
Содержание
    Инструменты‌
    • Сведения о странице
    • Постоянная ссылка
    • Версия для печати
    • Спецстраницы
    • Связанные правки
    • Ссылки сюда
    Login / Create Account
    Материал из for iRidium developers
    Перейти к: навигация, поиск
    Эта страница является переводом страницы Set Background Image. Перевод выполнен на 100%.

    Other languages:
    English • ‎русский

    Содержание

    • 1 Setting background image
    • 2 Changing and Setting Background Image
    • 3 Adaptation and Merge of Projects
    • 4 Operation Principle

    Setting background image


    An end-user can change an old image on a project page in i3 pro himself by pressing a button.

    documentation was last updated on 20.2.2021


    Example:

    Panel project

    Changing and Setting Background Image

    To change or set a new background image in i3 pro it is required to do the following.

    1 Launch the example of a project given above;

    2 Press the Set Background Image image and choose a required image in the gallery of the panel.

    SetBackgroundImage1.png
    SetBackgroundImage2.png
    We recommend to choose an image that correspinds to the parameters of a project (resolution, orientaion). Setting a background image in a low resolutions leads to poor image quality.


    Adaptation and Merge of Projects

    An example project is adapted and merged with your project in several steps:

    1 Create a button that will open a gallery to choose a background image;

    2 Create a project token to store a path to a selected image;

    3 Enter the format to display image (Image Stretch parameter) in page properties (Project > States tab):

    • Proportional - displays an image proportionally to the page;
    • Full Size - displays an image with streching to full page.

    При выборе параметра Proportional, if an image has a format that is different from the format of a page, page margins will be displayed with the image. For better display of images in a non-standard format, we recommend black filling of the page background.

    The parameter of the page is by default Image Stretch - None. It means that if the value of the parameter is not changes, the image will be displayed in its initial size (it can be of a much smaller size, or it can exceed the limits of a page).

    4 Copy and paste Script 1 to your project and replace the token and graphic items to the ones of your project.

    SetBackgroundImage3.png


    Operation Principle

    Setting/ changing the background image in a project is done with the help of functions in the Script editor:

    1 When the app is launched, the function sends SaveImagePath project token to the Image property of the page. An image (a path to which is written in project token) will be displayed on the screen;

    2 When the Set Background Image button is pressed, IR.OpenPhotoGallery() is called, it opens the panel gallery to choose an image;

    3 IR.EVENT_RECEIVE_PHOTO_FROM_GALLERY called event substitutes tha value of the Set Background Image' token with a path to a chosen image and installs a new background image (see point 1).

    Example:

    IR.AddListener(IR.EVENT_START, 0, function ()
    {
        IR.AddListener(IR.EVENT_RECEIVE_PHOTO_FROM_GALLERY, 0, function(filename, filepath) { 
             IR.SetVariable("Tokens.SaveImagePath", filepath); //write a path to a chosen image to token
             SetBackground(filepath); //call SetBackground() function
        });
        SetBackground(IR.GetVariable("Tokens.SaveImagePath")); //get token value
    });
     
    IR.AddListener(IR.EVENT_ITEM_RELEASE, IR.GetItem("Page 1").GetItem("Item 1"), function ()
    {
        IR.OpenPhotoGallery();  //open a panel gallery when the button is pressed
    });
     
    function SetBackground(BG){         
       IR.GetItem("Page 1").GetState(0).Image = BG; //install a new background image of a page
    }
    Источник — «https://dev.iridi.com/index.php?title=Set_Background_Image/en&oldid=106155»
    About us
    Company
    Team
    History
    Philosophy
    Rewards
    Partnership
    Our partner
    Partnership Programs
    Apply for partnership
    products
    iRidium pro
    iRidium lite
    iRidium gate
    iRidium server
    Loads
    iRidium pro
    iRidium lite
    Other version
    Marketing materials
    Support
    On-line courses/Video
    Recommended equipment
    Other version
    iRidium pro
    Documentation
    FAQ
    Forum
    iRidium lite
    Documentation
    Forum
    Projects
    Standart projects
    Smart buildings
    Smart house
    Special solution
    Find a dealer
    News
    Youtube
    Twitter
    VK
    Logo
    contact@iridi.com
    +7 (499) 322-73-29

    Privacy policy