Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

Windows Registry Hacks/Other miscellaneous tweaks

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Adding Resize option to images This hack will allow any JPG file to be resized from the context-menu. First: get ImageMagick toolkit for windows from This site and install it. Next: create a cmd file (a batch file for windows NT,XP, Vista) with the following contents: @echo off set CONVERTPATH="C:\Program Files\ImageMagick-6.3.7-Q16\" if "%2"=="" goto NoSizeArgument set SizeVariable=%1 set FileOnly=%~n2 set FileExtension=%~x2 set FilePath=%~p2 set DriveLetter=%~d2 goto DoConvert :noSizeArgument set SizeVariable=1024 set FileOnly=%~n1 set FileExtension=%~x1 set FilePath=%~p1 set DriveLetter=%~d1 :DoConvert %CONVERTPATH%convert.exe -resize "%SizeVariable%x%SizeVariable%>" "%DriveLetter%%FilePath%%FileOnly%%FileExtension%" "%DriveLetter%%FilePath%%FileOnly%_%SizeVariable%%FileExtension%" echo resized %FileOnly%%FileExtension% to %FileOnly%_%SizeVariable%%FileExtension% Let's say we name this file C:\Program Files\ImageMagick-6.3.7-Q16\convert1024.cmd Now we have the command at hand to resize an arbitrary image to max dimensions of 1024x1024, keeping the aspect ratio intact. Here's how we add this command to the context menu: Open any folder (e.g. My Documents) Go to Tools | Folder Options... On the opened dialog, go to the File Types tabsheet Select in the "registered file types" the file type you want to add the resize option for. E.g. choose JPG for the most commonly used file format. Click the 'Advanced' button. In the dialog that just opened, click the 'New...' button In 'Action' fill in the description of the resize action. E.g. enter 'Re&size to 1024x1024 max' Click the browse button, and navigate to the cmd file we created in the beginning. Select it, and Click OK to confirm it all. Close the File Types dialog, and presto: you now have a resize command at the ready.