<?xml version="1.0" encoding="UTF-8"?>
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">

    <_name>Set Image Attributes</_name>
    <id>org.inkscape.effect.image_attributes</id>

    <dependency type="executable" location="extensions">image_attributes.py</dependency>
    <dependency type="executable" location="extensions">inkex.py</dependency>

    <param name="tab_main" type="notebook">

        <!-- render images like in 0.48 -->
        <page name="tab_basic" _gui-text="Basic">
            <_param name="basic_desc1" type="description">Render all bitmap images like in older Inskcape versions.

Available options:</_param>
            <param name="fix_scaling" type="boolean" _gui-text="Support non-uniform scaling">true</param>
            <param name="fix_rendering" type="boolean" _gui-text="Render images blocky">false</param>
        </page>

        <!-- image aspect ratio -->
        <page name="tab_aspectRatio" _gui-text="Image Aspect Ratio">
            <param name="aspect_ratio" type="enum" _gui-text="preserveAspectRatio attribute:">
                <item value="none">none</item>
                <_item value="unset">Unset</_item>
                <item value="xMinYMin">xMinYMin</item>
                <item value="xMidYMin">xMidYMin</item>
                <item value="xMaxYMin">xMaxYMin</item>
                <item value="xMinYMid">xMinYMid</item>
                <item value="xMidYMid">xMidYMid</item>
                <item value="xMaxYMid">xMaxYMid</item>
                <item value="xMinYMax">xMinYMax</item>
                <item value="xMidYMax">xMidYMax</item>
                <item value="xMaxYMax">xMaxYMax</item>
            </param>
            <param name="aspect_clip" type="enum" _gui-text="meetOrSlice:">
                <item value="unset">-</item>
                <item value="meet">meet</item>
                <item value="slice">slice</item>
            </param>
            <param name="aspect_ratio_scope" type="enum" _gui-text="Scope:">
                <_item value="selected_only">Change only selected image(s)</_item>
                <_item value="in_selection">Change all images in selection</_item>
                <_item value="in_document">Change all images in document</_item>
            </param>
        </page>

        <!-- image-rendering -->
        <page name="tab_image_rendering" _gui-text="Image Rendering Quality">
            <param name="image_rendering" type="enum" _gui-text="Image rendering attribute:">
                <_item value="unset">Unset</_item>
                <item value="auto">auto</item>
                <item value="optimizeQuality">optimizeQuality</item>
                <item value="optimizeSpeed">optimizeSpeed</item>
                <item value="inherit">inherit</item>
            </param>
            <param name="image_rendering_scope" type="enum" _gui-text="Scope:">
                <_item value="selected_only">Change only selected image(s)</_item>
                <_item value="in_selection">Change all images in selection</_item>
                <_item value="in_document">Change all images in document</_item>
                <_item value="on_parent_group">Apply attribute to parent group of selection</_item>
                <_item value="on_root_only" >Apply attribute to SVG root</_item>
            </param>
        </page>

    </param>

    <effect needs-document="true" needs-live-preview="true">
        <object-type>all</object-type>
        <effects-menu>
            <submenu _name="Images"/>
        </effects-menu>
    </effect>

    <script>
        <command reldir="extensions" interpreter="python">image_attributes.py</command>
    </script>

    <options silent="false"></options>

</inkscape-extension>

