< Back
Get-ImageSourceFromFile
Post
NAME Get-ImageSourceFromFile
SYNOPSIS
Gets ImageSource object from a bitmap file to be used as an icon.
SYNTAX
Get-ImageSourceFromFile [-Path] <String[]> [<CommonParameters>]
DESCRIPTION
Get-ImageSourceFromFile gets an ImageSource object from a bitmap file to use as an icon. The Path parameter can
accept file paths, network shares, or web addresses, as long as the destination is a bitmap image, such as a .png
or .ico.
PARAMETERS
-Path <String[]>
The path to the file containing the bitmap image to retrieve.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
Get-ImageSourceFromFile accepts string objects of URI paths to the Path parameter binding to the Path property.
OUTPUTS
System.Windows.Media.Imaging.BitmapImage
Get-ImageSourceFromFile outputs a System.Windows.Media.Imaging.BitmapImage object representing the bitmap image.
-------------------------- EXAMPLE 1 --------------------------
PS C:>Get-ImageSourceFromFile -Path C:\\SomeIconFile.ico
This command will retrieve the ImageSource object from the bitmap file.
RELATED LINKS
SYNOPSIS
Gets ImageSource object from a bitmap file to be used as an icon.
SYNTAX
Get-ImageSourceFromFile [-Path] <String[]> [<CommonParameters>]
DESCRIPTION
Get-ImageSourceFromFile gets an ImageSource object from a bitmap file to use as an icon. The Path parameter can
accept file paths, network shares, or web addresses, as long as the destination is a bitmap image, such as a .png
or .ico.
PARAMETERS
-Path <String[]>
The path to the file containing the bitmap image to retrieve.
Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.String
Get-ImageSourceFromFile accepts string objects of URI paths to the Path parameter binding to the Path property.
OUTPUTS
System.Windows.Media.Imaging.BitmapImage
Get-ImageSourceFromFile outputs a System.Windows.Media.Imaging.BitmapImage object representing the bitmap image.
-------------------------- EXAMPLE 1 --------------------------
PS C:>Get-ImageSourceFromFile -Path C:\\SomeIconFile.ico
This command will retrieve the ImageSource object from the bitmap file.
RELATED LINKS