Click here for "Safe Air Conditioner Repair and Proper Freon Recovery".

Converting image file formats on Linux

Converting image file formats on Linux

In Linux, there is an image format conversion command, convert command.
The convert command is part of the “ImageMagick” package and allows you to perform a variety of image conversions with the command.
To run the convert command, specify the file to be converted and the file to be converted as arguments.
The file format is automatically determined by the extension included in the file name.

[root@Lion ~]#  ls  ←Displays the contents of the current directory
sample.jpg


[root@Lion ~]# convert sample.jpg sample.BMP
↑JPG file “sample.jpg” is converted to BMP file “sample.BMP


[root@Lion ~]# ls
sample.BMP sample.jpg  ←A “sample.BMP” file has been created.
[root@Lion ~]#  convert sample.BMP sample.PNG
↑BMP format file “sample.BMP” is converted to PNG format file “sample.PNG”.

[root@Lion ~]# ls
sample.BMP sample.PNG sample.jpg ←A “sample.PNG” file has been created.

[root@Lion ~]# convert sample.PNG sample.TIFF
↑Convert PNG format file “sample.PNG” to TIFF format file “sample.TIFF
[
[root@Lion ~]# ls
sample.BMP sample.PNG sample.TIFF sample.jpg ←he file “sample.TIFF” has been created.
タイトルとURLをコピーしました