Resizing Image Using Command Line in GNU/Linux

When the width of the image uploaded to a site is not proper , it may break the design . I have seen many people uploading images of greater width . One thing we can do is to resize the image to a particular size when its uploaded using the php GD graphics library. The php GD graphics library is an awesome one. We can use this library to create captcha images , water mark , rotate and much more. Yes , now coming to command line . The resizing of an image using command line is pretty simple. Below are the steps which you can use to do this 1 ) Open Terminal / Command prompt / bash shell.( Applications->Accessories->Terminal in Ubuntu ) 2 ) Hope you have installed the image magic studio . To try whether its installed , just give the command convert and If you have installed the image magic , then will display a list of options . If you dont have just go to synaptic package manager and install it .( System->Administration->Synaptic Package Manager ) , or apt-get will make you install it . 3 ) To resize an image to width of 500 px give the command from prompt $ convert -resize 500 imagename.extension new_image.extension Eg : convert -resize 500 hari_kt.jpg new_hari.jpg You can give this command when hari_kt.jpg in the current directory only . Else you can specify the real path . For eg : /home/hari/hari_kt.jpg If you are new to GNU/LINUX , try to learn some basic commands like ls , pwd , cd , mkdir , rm etc. The mannuals for these are already installed. So just give the command $ man . Eg : man ls ( Press Esc q to quit ) . There is plenty more. But little busy in the next free time will post it .

command line, gnu/linux, image, resize