Browse Source

removed extranious commenting

master
lucid 2 years ago
parent
commit
0a9dc6bf33
1 changed files with 1 additions and 4 deletions
  1. +1
    -4
      profile-img.bat

+ 1
- 4
profile-img.bat View File

@ -24,7 +24,7 @@ if "%IMAGE%" == "" (
goto pause
)
rem Verify image extension, per lucid's request
rem Verify image extension
set NAME=%IMAGE:"=%
rem Convert to lowercase
@ -100,8 +100,6 @@ if not %errorlevel% == 0 (
rem On recent Windows 10 versions, resolutions called for are:
rem 32x32, 40x40, 48x48, 64x64, 96x96, 192x192, 208x208, 240x240, 424x424,
rem 448x448, 1080x1080
rem This is ridiculous and I don't know why it can't be resized dynamically by
rem Windows, but sure
set FOLDER=%PUBLIC%\AccountPictures\%SID%
md "%FOLDER%" >nul 2>&1
@ -109,7 +107,6 @@ takeown /r /d Y /f "%FOLDER%" >nul
icacls "%FOLDER%" /reset /t >nul
del /q /f "%FOLDER%\*" > nul
rem Set word wrap to 80 columns and this will become readable. I'm so sorry...
powershell "Add-Type -AssemblyName System.Drawing; $img = [System.Drawing.Image]::FromFile((Get-Item """%IMAGE:"=`"""%""")); $a = New-Object System.Drawing.Bitmap(32, 32); $graph = [System.Drawing.Graphics]::FromImage($a); $graph.DrawImage($img, 0, 0, 32, 32); $a.Save("""%FOLDER:"=`"""%\32x32.png"""); $b = New-Object System.Drawing.Bitmap(40, 40); $graph = [System.Drawing.Graphics]::FromImage($b); $graph.DrawImage($img, 0, 0, 40, 40); $b.Save("""%FOLDER:"=`"""%\40x40.png"""); $c = New-Object System.Drawing.Bitmap(48, 48); $graph = [System.Drawing.Graphics]::FromImage($c); $graph.DrawImage($img, 0, 0, 48, 48); $c.Save("""%FOLDER:"=`"""%\48x48.png"""); $d = New-Object System.Drawing.Bitmap(64, 64); $graph = [System.Drawing.Graphics]::FromImage($d); $graph.DrawImage($img, 0, 0, 64, 64); $d.Save("""%FOLDER:"=`"""%\64x64.png"""); $e = New-Object System.Drawing.Bitmap(96, 96); $graph = [System.Drawing.Graphics]::FromImage($e); $graph.DrawImage($img, 0, 0, 96, 96); $e.Save("""%FOLDER:"=`"""%\96x96.png"""); $f = New-Object System.Drawing.Bitmap(192, 192); $graph = [System.Drawing.Graphics]::FromImage($f); $graph.DrawImage($img, 0, 0, 192, 192); $f.Save("""%FOLDER:"=`"""%\192x192.png"""); $g = New-Object System.Drawing.Bitmap(208, 208); $graph = [System.Drawing.Graphics]::FromImage($g); $graph.DrawImage($img, 0, 0, 208, 208); $g.Save("""%FOLDER:"=`"""%\208x208.png"""); $h = New-Object System.Drawing.Bitmap(240, 240); $graph = [System.Drawing.Graphics]::FromImage($h); $graph.DrawImage($img, 0, 0, 240, 240); $h.Save("""%FOLDER:"=`"""%\240x240.png"""); $i = New-Object System.Drawing.Bitmap(424, 424); $graph = [System.Drawing.Graphics]::FromImage($i); $graph.DrawImage($img, 0, 0, 424, 424); $i.Save("""%FOLDER:"=`"""%\424x424.png"""); $j = New-Object System.Drawing.Bitmap(448, 448); $graph = [System.Drawing.Graphics]::FromImage($j); $graph.DrawImage($img, 0, 0, 448, 448); $j.Save("""%FOLDER:"=`"""%\448x448.png"""); $k = New-Object System.Drawing.Bitmap(1080, 1080); $graph = [System.Drawing.Graphics]::FromImage($k); $graph.DrawImage($img, 0, 0, 1080, 1080); $k.Save("""%FOLDER:"=`"""%\1080x1080.png"""); "
set KEY=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AccountPicture\Users\%SID%


Loading…
Cancel
Save