ImageDataUriConverter.dll-Help.xml
<?xml version="1.0" encoding="utf-8" ?>
<helpItems xmlns="http://msh" schema="maml"> <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>Invoke-ImageToDataUri</command:name> <command:verb>Invoke</command:verb> <command:noun>ImageToDataUri</command:noun> <maml:description> <maml:para> Convert an image file to a base64 data uri. </maml:para> </maml:description> </command:details> <maml:description> <maml:para> Convert an image file to a base64 data uri. </maml:para> <maml:para> Optionally resize the image first by supplying width and/or height parameters. (original file retained, resizing is done in memory) </maml:para> </maml:description> <command:parameters> <command:parameter required="true" pipelineInput="true" variableLength="true" position="0"> <maml:name>Image</maml:name> <maml:description> <maml:para> Image file name relative to current location, or relative path and image file name, or full path of image </maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">String</command:parameterValue> <dev:type>String</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="true" position="1"> <maml:name>Width</maml:name> <maml:description> <maml:para> If supplied then the image will be resized to this width maintaining aspect ratio. (original file retained, resizing is done in memory) </maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">Int</command:parameterValue> <dev:type>Int</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="true" position="2"> <maml:name>Height</maml:name> <maml:description> <maml:para> If supplied then the image will be resized to this height maintaining aspect ratio. (original file retained, resizing is done in memory) </maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">Int</command:parameterValue> <dev:type>Int</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="false"> <maml:name>CopyToClipboard</maml:name> <maml:description> <maml:para> If supplied the data uri will be saved to the clipboard. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type>SwitchParameter</dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="false"> <maml:name>AsHtmlImgTag</maml:name> <maml:description> <maml:para> If supplied the data uri will be returned embedded in an img html tag. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type>SwitchParameter</dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <command:example> <maml:title>Example 1: Convert an image file to a data uri</maml:title> <maml:Introduction> <maml:paragraph>C:\PS></maml:paragraph> </maml:Introduction> <dev:code>Invoke-ImageToDataUri -File 'C:\Temp\an.image.png'</dev:code> <dev:remarks> <maml:para> Convert an image file to a data uri. </maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 2: Convert an image file to a data uri using pipeline and resize to 30px x 30px</maml:title> <maml:Introduction> <maml:paragraph>C:\PS></maml:paragraph> </maml:Introduction> <dev:code>'C:\Temp\an.image.png' | Invoke-ImageToDataUri -Width 30 -Height 30</dev:code> <dev:remarks> <maml:para> Convert an image file to a data uri using pipeline and resize to 30px x 30px </maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 3: Convert an image file to a data uri within an html img tag</maml:title> <maml:Introduction> <maml:paragraph>C:\PS></maml:paragraph> </maml:Introduction> <dev:code>Invoke-ImageToDataUri -File 'C:\Temp\an.image.png' -AsHtmlImgTag</dev:code> <dev:remarks> <maml:para> Convert an image file to a data uri within an html img tag </maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/trossr32/ps-image-data-uri-converter</maml:linkText> </maml:navigationLink> </maml: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>Invoke-DataUriToImage</command:name> <command:verb>Invoke</command:verb> <command:noun>DataUriToImage</command:noun> <maml:description> <maml:para> Create an image file from a base64 data uri. </maml:para> </maml:description> </command:details> <maml:description> <maml:para> Create an image file from a base64 data uri. </maml:para> </maml:description> <command:parameters> <command:parameter required="true" pipelineInput="true" variableLength="true" position="0"> <maml:name>DataUri</maml:name> <maml:description> <maml:para> Data uri, e.g. data:image/png;base64,iVBORw0K... </maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">String</command:parameterValue> <dev:type>String</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="true" position="1"> <maml:name>OutFile</maml:name> <maml:description> <maml:para> Output file path or file path and file name </maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> <dev:type>String</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> </command:parameters> <command:examples> <command:example> <maml:title>Example 1: Create an image file from a base64 data uri.</maml:title> <maml:Introduction> <maml:paragraph>C:\PS></maml:paragraph> </maml:Introduction> <dev:code>Invoke-DataUriToImage -DataUri 'data:image/png;base64,iVBORw0K...'</dev:code> <dev:remarks> <maml:para> Create an image file from a base64 data uri. </maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 2: Create an image file from a base64 data uri and specify the image file to be created</maml:title> <maml:Introduction> <maml:paragraph>C:\PS></maml:paragraph> </maml:Introduction> <dev:code>Invoke-DataUriToImage -DataUri 'data:image/png;base64,iVBORw0K...' -OutFile 'C:\Temp\an.image.png'</dev:code> <dev:remarks> <maml:para> Create an image file from a base64 data uri and specify the image file to be created. </maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/trossr32/ps-image-data-uri-converter</maml:linkText> </maml:navigationLink> </maml: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>Invoke-DataUriResize</command:name> <command:verb>Invoke</command:verb> <command:noun>DataUriResize</command:noun> <maml:description> <maml:para> Convert a base64 data uri to a resized data uri. </maml:para> </maml:description> </command:details> <maml:description> <maml:para> Convert a base64 data uri to a resized data uri. </maml:para> </maml:description> <command:parameters> <command:parameter required="true" pipelineInput="true" variableLength="true" position="0"> <maml:name>DataUri</maml:name> <maml:description> <maml:para> Data uri, e.g. data:image/png;base64,iVBORw0K... </maml:para> </maml:description> <command:parameterValue required="true" variableLength="true">String</command:parameterValue> <dev:type>String</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="true" position="1"> <maml:name>Width</maml:name> <maml:description> <maml:para> If supplied then the image will be resized to this width maintaining aspect ratio. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">Int</command:parameterValue> <dev:type>Int</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="true" position="2"> <maml:name>Height</maml:name> <maml:description> <maml:para> If supplied then the image will be resized to this height maintaining aspect ratio. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">Int</command:parameterValue> <dev:type>Int</dev:type> <dev:defaultvalue>null</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="false"> <maml:name>CopyToClipboard</maml:name> <maml:description> <maml:para> If supplied the data uri will be saved to the clipboard. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type>SwitchParameter</dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <command:example> <maml:title>Example 1: Resize a data uri and copy to clipboard</maml:title> <maml:Introduction> <maml:paragraph>C:\PS></maml:paragraph> </maml:Introduction> <dev:code>Invoke-DataUriResize -DataUri 'data:image/png;base64,iVBORw0K...' -CopyToClipboard</dev:code> <dev:remarks> <maml:para> Resize a data uri and copy to clipboard. </maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/trossr32/ps-image-data-uri-converter</maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> </helpItems> |