首页 > 其他分享 >FormatConvertedBitmap DestinationFormat Gray32Float BlackWhite

FormatConvertedBitmap DestinationFormat Gray32Float BlackWhite

时间:2024-09-24 10:44:59浏览次数:1  
标签:DestinationFormat FormatConvertedBitmap Gray32Float BlackWhite

 

<Window x:Class="WpfApp410.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp410"
        mc:Ignorable="d"
        WindowState="Maximized"
        WindowStyle="None"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Image Grid.Column="0" Source="/Images/1.jpg"/>
        <Image Grid.Column="1">
            <Image.Source>
                <FormatConvertedBitmap Source="/Images/1.jpg"
                                       DestinationFormat="Gray32Float"/>
            </Image.Source>
        </Image>
        <Image Grid.Column="2">
            <Image.Source>
                <FormatConvertedBitmap Source="/Images/1.jpg"
                               DestinationFormat="BlackWhite"/>
            </Image.Source>
        </Image>
    </Grid>
</Window>

 

标签:DestinationFormat,FormatConvertedBitmap,Gray32Float,BlackWhite
From: https://www.cnblogs.com/Fred1987/p/18428668

相关文章