en-US/PerceptHashLib.dll-Help.xml
<?xml version="1.0" encoding="utf-8"?> <helpItems schema="maml" xmlns="http://msh"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Compare-PerceptHash</command:name> <command:verb>Compare</command:verb> <command:noun>PerceptHash</command:noun> <maml:description> <maml:para>Compares the provided perceptual hashes and returns the difference as an integer.</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The `Compare-PerceptHash` cmdlet compares the provided perceptual hashes and returns the difference as an integer.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Compare-PerceptHash</maml:name> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>ReferenceHash</maml:name> <maml:description> <maml:para>Specifies a perceptual hash to be compared with.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>DifferenceHash</maml:name> <maml:description> <maml:para>Specifies a perceptual hash to compare with the value of `ReferenceHash`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"> <maml:name>DifferenceHash</maml:name> <maml:description> <maml:para>Specifies a perceptual hash to compare with the value of `ReferenceHash`.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="0" aliases="none"> <maml:name>ReferenceHash</maml:name> <maml:description> <maml:para>Specifies a perceptual hash to be compared with.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Object</command:parameterValue> <dev:type> <maml:name>Object</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.Object</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.Int32</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>$hash1 = Get-PerceptHash ./image1.jpg $hash2 = Get-PerceptHash ./image2.jpg ComparePerceptHash -ReferenceHash $hash1 -DifferenceHash $hash2</dev:code> <dev:remarks> <maml:para>Compares image1.jpg and image2.jpg returning the difference using the dHash algorithm.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>Get-PerceptHash ./image1.jpg | ComparePerceptHash -DifferenceHash '6964565642464933'</dev:code> <dev:remarks> <maml:para>Compares image1.jpg with the plain dHash value `6964565642464933`.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://joshooaj.com/PerceptHash/commands/en-US/Compare-PerceptHash/</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Get-PerceptHash</command:name> <command:verb>Get</command:verb> <command:noun>PerceptHash</command:noun> <maml:description> <maml:para>Gets a perceptual hash of the provided image(s).</maml:para> </maml:description> </command:details> <maml:description> <maml:para>The `Get-PerceptHash` cmdlet gets a perceptual hash of the provided image(s). In the current version only the dHash algorithm is available. Future versions may include additional algorithms.</maml:para> </maml:description> <command:syntax> <command:syntaxItem> <maml:name>Get-PerceptHash</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>InputStream</maml:name> <maml:description> <maml:para>Specifies a memory, file, or other stream object representing an image from disk or some other source.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Stream</command:parameterValue> <dev:type> <maml:name>Stream</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Algorithm</maml:name> <maml:description> <maml:para>Specifies the perceptual hash algorithm to use. At present, only dHash is supported.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">dhash</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">PerceptHashAlgorithm</command:parameterValue> <dev:type> <maml:name>PerceptHashAlgorithm</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-PerceptHash</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="0" aliases="none"> <maml:name>LiteralPath</maml:name> <maml:description> <maml:para>Specifies the exact file path for the image, or images to be hashed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Algorithm</maml:name> <maml:description> <maml:para>Specifies the perceptual hash algorithm to use. At present, only dHash is supported.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">dhash</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">PerceptHashAlgorithm</command:parameterValue> <dev:type> <maml:name>PerceptHashAlgorithm</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> <command:syntaxItem> <maml:name>Get-PerceptHash</maml:name> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Specifies the path to one or more images to be hashed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Algorithm</maml:name> <maml:description> <maml:para>Specifies the perceptual hash algorithm to use. At present, only dHash is supported.</maml:para> </maml:description> <command:parameterValueGroup> <command:parameterValue required="false" command:variableLength="false">dhash</command:parameterValue> </command:parameterValueGroup> <command:parameterValue required="true" variableLength="false">PerceptHashAlgorithm</command:parameterValue> <dev:type> <maml:name>PerceptHashAlgorithm</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:syntaxItem> </command:syntax> <command:parameters> <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"> <maml:name>Algorithm</maml:name> <maml:description> <maml:para>Specifies the perceptual hash algorithm to use. At present, only dHash is supported.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">PerceptHashAlgorithm</command:parameterValue> <dev:type> <maml:name>PerceptHashAlgorithm</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="0" aliases="none"> <maml:name>InputStream</maml:name> <maml:description> <maml:para>Specifies a memory, file, or other stream object representing an image from disk or some other source.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">Stream</command:parameterValue> <dev:type> <maml:name>Stream</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="0" aliases="none"> <maml:name>LiteralPath</maml:name> <maml:description> <maml:para>Specifies the exact file path for the image, or images to be hashed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName, ByValue)" position="0" aliases="none"> <maml:name>Path</maml:name> <maml:description> <maml:para>Specifies the path to one or more images to be hashed.</maml:para> </maml:description> <command:parameterValue required="true" variableLength="false">String[]</command:parameterValue> <dev:type> <maml:name>String[]</maml:name> <maml:uri /> </dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:inputTypes> <command:inputType> <dev:type> <maml:name>System.String[]</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:inputType> </command:inputTypes> <command:returnValues> <command:returnValue> <dev:type> <maml:name>System.String</maml:name> </dev:type> <maml:description> <maml:para></maml:para> </maml:description> </command:returnValue> </command:returnValues> <maml:alertSet> <maml:alert> <maml:para></maml:para> </maml:alert> </maml:alertSet> <command:examples> <command:example> <maml:title>-------------------------- Example 1 --------------------------</maml:title> <dev:code>Get-PerceptHash -Path ./image.jpg</dev:code> <dev:remarks> <maml:para>Gets the perceptual hash for `image.jpg` in the current directory using the dHash algorithm.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 2 --------------------------</maml:title> <dev:code>Get-PerceptHash -LiteralPath 'image[2].jpg'</dev:code> <dev:remarks> <maml:para>Gets the perceptual hash for `image[2].jpg` in the current directory using the dHash algorithm. The square brackets in the file name require the use of the `LiteralPath` parameter instead of the default `Path` parameter.</maml:para> </dev:remarks> </command:example> <command:example> <maml:title>-------------------------- Example 3 --------------------------</maml:title> <dev:code>$memoryStream = [io.memorystream]::new() $bytes = [io.file]::ReadAllBytes('image.jpg') $memoryStream.Write($bytes, 0, $bytes.Length) $memoryStream.Position = 0 Get-PerceptHash -InputStream $memoryStream</dev:code> <dev:remarks> <maml:para>In many cases there may not be a file on disk and the image is in a stream object. In that case you can use the `InputStream` parameter to generate a perceptual hash. The use of `IO.MemoryStream` here is only for demonstration purposes.</maml:para> </dev:remarks> </command:example> </command:examples> <command:relatedLinks> <maml:navigationLink> <maml:linkText>Online Version:</maml:linkText> <maml:uri>https://joshooaj.com/PerceptHash/commands/en-US/Get-PerceptHash/</maml:uri> </maml:navigationLink> </command:relatedLinks> </command:command> </helpItems> |