File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -9,10 +9,13 @@ function Convert-ImageToHtml
99 . PARAMETER $MakeHtml
1010 An HTML file will be created using the same name as the image file.
1111 . EXAMPLE
12+ Convert a single image file to an HTML IMG tag and display the code.
1213 PS C:\> Convert-ImageToHtml -$ImageFile c:\temp\picture.png -Verbose
1314 . EXAMPLE
15+ Convert a directory of images to HTML IMG tags and display the code.
1416 PS C:\> Get-ChildItem *.png | select fullname | Convert-ImageToHtml -Verbose
1517 . EXAMPLE
18+ Convert a directory of images to HTML IMG tags, display the code, and write them to html files.
1619 PS C:\> Get-ChildItem *.png | select fullname | Convert-ImageToHtml -Verbose -MakeHtml
1720 . NOTES
1821 Author: Scott Sutherland (@_nullbind)
@@ -59,8 +62,8 @@ function Convert-ImageToHtml
5962 # Display image tag
6063 $output
6164
62- if ($HtmlFile ){
63- $output | Out-File " $HtmlFile "
65+ if ($MakeHtml ){
66+ $output | Out-File " $ImageFile .html "
6467 }
6568 }catch {
6669 Write-Error " Something went wrong. Check your paths. :)" - ErrorId B1 - TargetObject $_
You can’t perform that action at this time.
0 commit comments