A cikin labarin na gaba zamu kalli GraphicsMagick. Wannan shi ne kunshin kyauta, na zamani da na buda ido don sarrafa hoto. Da farko an samo asali ne daga ImageMagick, kodayake a tsawon shekarun ya zama aiki mai zaman kansa gaba ɗaya. Ya zo da wasu ci gaba da ƙarin abubuwa. Yana gudana akan Gnu / Linux, MacOS, da Windows.
Mawallafi zai iya ƙirƙirar sabbin hotuna akan tashi, don haka abin yake dace da ƙirƙirar aikace-aikacen gidan yanar gizo masu kuzari. Hakanan za'a iya amfani dashi don sake girman, juyawa, mai da hankali, rage launi ko ƙara abubuwa na musamman zuwa hoto da adana sakamakon a cikin tsari iri ɗaya ko daban.
Ana samun ayyukan sarrafa hoto daga layin umarni. Yana ba da fa'idodi iri-iri masu amfani da inganci, har ma da dakunan karatu waɗanda ke ba mu damar karantawa, rubutawa da sarrafa hotunanmu a cikin samfuran shahararru 88 (kamar su GIF, JPEG, JPEG-2000, PNG, PDF, PNM da TIFF da sauransu). Yana da mahimmanci a lura da hakan iya ƙirƙirar GIF animation daga hotuna da yawa.
Sanya GraphicsMagick akan tsarin Ubuntu
A cikin Debian da dangoginsu, kamar Ubuntu da Linux Mint, za mu iya girka shi ta amfani da APT package manager kamar yadda aka nuna a cikin masu zuwa. Dole ne kawai mu buɗe tashar (Ctrl + Alt + T) kuma mu rubuta a ciki:
sudo apt update && sudo apt install graphicsmagick
Duba shigarwar GraphicsMagick
Don samun damar ayyukan GraphicsMagick, kuna amfani da umarnin gm. Wannan kayan aikin layin umarni ne mai karfi wanda yayi daban-daban subcommands kamar nunawa, rayarwa, tarawa, kwatantawa, ganowa, tsarawa da sauran hanyoyi da dama, don samun damar ainihin ayyukan.
para tabbatar cewa an sanya kunshin GraphicsMagick akan tsarinmu, zamu aiwatar da umarni mai zuwa a cikin wannan tashar:
gm display
Bayan wannan, zamu aiwatar da jerin umarni masu zuwa ne kawai zuwa duba fannoni da yawa na shigarwar kunshin:
- Don tabbatarwa abin da siffofin hoto ke tallafawa:
gm convert -list formats
- Zamu iya tantancewa menene tushen buga:
gm convert -list fonts
- Zamu iya duba idan an tsara shirye-shiryen waje kamar yadda ake tsammani buga:
gm convert -list delegates
- Duba idan ma'anar launi za a iya ɗora Kwatancen:
gm convert -list colors
- Kuma a ƙarshe zuwa duba cewa GraphicsMagick daidai yake gano albarkatun inji za mu rubuta:
gm convert -list resources
Amfani da GraphicsMagick akan Ubuntu
Nan gaba zamu ga wasu Misalai na asali na yadda ake amfani da umarnin gm:
Duba hoto
para Nuna hoto daga tashar (Ctrl + Alt + T), za mu aiwatar da umarni mai zuwa:
gm display sapoclayASCII.png
Lokacin da aka nuna hoton, idan muka danna shi tare da linzamin kwamfuta, za mu ga menu da aka nuna a cikin hoton da ya gabata, wanda zai sauƙaƙa mana don yin gyare-gyare a kansa.
Girman hoto
Don sake girman hoto tare da sabon faɗi, za mu tantance faɗi da tsayi cewa za ta atomatik sikelin gwargwado. Dole kawai mu rubuta irin wannan tashar:
gm convert -resize 300 sapoclayASCII.png sapoclayASCII-resize-300.png
Don ganin sakamakon umarnin da ya gabata, za mu ƙaddamar da umarnin da muka gani a baya:
gm display sapoclayASCII-resize-300.png
Irƙiri hoto mai rai daga hotuna da yawa
Don ƙirƙirar hoto mai rai daga hotuna daban daban waɗanda ana sanya su a cikin kundin adireshin aiki na yanzu, zamu iya amfani da wannan umarnin:
gm animate *.png
Maida hoto zuwa wani tsari
Don canza hoto daga tsari ɗaya zuwa wani, misali .jpg zuwa .png, za mu rubuta:
gm convert imagen.jpg imagen.png
Duba cikakken kundin adireshi na hotuna
Za mu iya ganin cikakken kundin adireshi na hotuna, .png a wannan yanayin, ta hanyar buga wannan umarnin:
gm convert 'vid:*.png' all_png.miff
Don ganin sakamakon ƙarshe, muna rubuta:
gm display all_png.miff
Createirƙiri hoto mai haɗuwa (a cikin tsarin ƙira)
Hakanan zai zama mai yuwuwar ƙirƙirar hoto mai haɗuwa (a cikin tsarin grid) daga hotuna daban-daban, kamar yadda aka nuna a cikin masu zuwa:
gm montage entreunosyceros.png ojo.jpeg sapoclayASCII.png SapoClayV2.png sapoRelax.png imagen-compuesta.png
Muna iya ganin sakamakon ta ƙaddamar da sakamakon fayil ɗin:
gm display imagen-compuesta.png
Possarin hanyoyi
Tare da umarnin gm zamu iya yin ƙarin abubuwa da yawa. Kamar yadda na rubuta a farkon labarin, kawai mun ga wasu misalai na asali. Za su iya duba duk zaɓuka don gm, rubuta:
gm -help
Don ganin yiwuwar zaɓuɓɓukan aikin canzawa, misali, zamu rubuta:
gm help convert
Idan kuna son ƙarin bayani game da wannan aikin to lallai ku je wurin official website.