Uyhlela njani, uguqula kwaye uphinde ubuyekeze imifanekiso emininzi ngexesha elinye ku-Ubuntu

Hlela imifanekiso ku-Ubuntu

Kukho iindlela ezininzi zokuhlela imifanekiso ku-Ubuntu, kodwa mna andizithandi uninzi lwazo. Ukuba ndifuna ukwenza ubungakanani kwakhona kumfanekiso, andiziva ndilinde ixesha elithathwayo ukuvula i-GIMP. Singahlala sifaka nautilus-umfanekiso-esiguquliweyo ukujikeleza kunye nokujikeleza imifanekiso ngeqhosha lasekunene ukusuka kwiNautilus kodwa, kutheni ufaka iphakheji, engabonisi isicatshulwa ngasentla, ukuba siyifakele enye ngokungagqibekanga eyenzayo? Kule nqaku siza kukufundisa ukuhlela, ukuguqula, ukuphinda wenze ubungakanani kwakhona kunye nezinye izinto imifanekiso ukusuka Ubuntu Terminal.

Eyona nto ingcono, into esiza kuyichaza kwesi sikhokelo inokusetyenziswa kwimifanekiso eliqela ngaxeshanye. Umzekelo, ukuba sifuna ukunika igama kwakhona iifoto ezili-10 ngaphandle kokucofa ekunene, khetha u "Qamba ngokutsha" kwaye ubeke igama amaxesha ali-10, sinokuyenza ImageMagick, Ubuntu bokujonga umfanekiso ongagqibekanga kunye nolunye usasazo, kubandakanya Ubuntu MATE, endiyithandayo. Apha ngezantsi unemizekelo emininzi yokuyalela ukuba wenze le misebenzi usebenzisa i-Ubuntu Bash.

iMageMagick

I-ImageMagick iza ifakwe kulwabiwo oluninzi, njengaleyo ichazwe ngasentla Ubuntu okanye Ubuntu MATE. Ukuba i-distro yakho ayifakwanga ngokungagqibekanga, ungayifaka ngokuvula iTheminali kwaye uchwetheze lo myalelo ulandelayo:

sudo apt-get install imagemagick

Qamba kwakhona imifanekiso

Ukuba, umzekelo, wenza uqeqesho lwezixhobo ezininzi, baya kuba negama elingenanto yakwenza nento esifuna ukuyibonisa. Enkosi kwi-ImageMagick sinokuthiya igama kwakhona kwi-terminal ngomyalelo olula. Njengoko uza kubona kamva, sinokutshintsha ifomathi yemifanekiso kwaye siya kusebenzisa umyalelo ofanayo, kodwa kufanelekile kumsebenzi wethu. Iya kuba yile ilandelayo:

convert *.png prueba.png

Ngokugcina ulwandiso kunye nokongeza igama eliphumayo, into oza kuyenza kukugcina bonke ngegama elinye, kodwa ngenani elahlukileyo.

Yenza ubungakanani kwakhona bemifanekiso

Phantse lonke uhlelo lwesikhokelo lusebenzisa isitshixo guqula. Ukwenza ubungakanani kwakhona beemifanekiso nge-ImageMagick ukusuka kwiTheminali siza kubhala lo myalelo ulandelayo, apho «kuvavanywa» iya kuba ligama lomfanekiso esifuna ukuwuguqulela kwenye ifomathi:

convert prueba.png -resize 200×100 prueba.png

Ngomyalelo odlulileyo siya kuba nawo yenze umfanekiso kwakhona kubungakanani beepikseli ezingama-200 × 100. Ixabiso lokuqala bubungakanani ububanzi kwaye okwesibini ukuphakama. Ukuba sisebenzisa igama elifanayo, umfanekiso oza kubakho uza kuthatha indawo yentsusa. Ukuba sifuna ukutshintsha ububanzi kunye nobude ngokulinganayo, siya kubhala lo myalelo ulandelayo, apho i-200 iya kuba bubungakanani obukhethiweyo kwiiphikseli:

convert prueba.png -resize 200 prueba.png

Ukuba sifuna ukuba ibe ngamaphikseli angama-200 ukuphakama, kuya kufuneka sihambe khupha ixabiso lokuqala ("Awunanto" x100), ke siza kubhala lo myalelo ulandelayo:

convert prueba.png -resize x100 prueba.png

Ngamanye amaxesha amaxabiso ngqo, kodwa ukuba sifuna ukuba njalo, singabhala lo myalelo ulandelayo, apho i-200 × 100 iya kuba bubungakanani obukhethiweyo:

convert prueba.png -resize 200×100! prueba.png

Jikelezisa imifanekiso

hlela-imifanekiso-ubuntu

Ukuba sifuna ntoni Jikelezisa imifanekiso, singayenza ngalo myalelo ulandelayo, apho ama-90 angangumlinganiso wokuthambekela

convert prueba.jpg -rotate 90 prueba-rotado.jpg

Iya kongeza isicatshulwa esisiqwalaselayo kwifayile yemveliso, ukuba nje siyibhala ngendlela eyahlukileyo.

Hlela ifomathi yomfanekiso

I-ImageMagick ikwasivumela guqula imifanekiso kwenye ifomathi ngqo kwiTheminali. Siza kuyenza ngalo myalelo ulandelayo:

convert prueba.png prueba.jpg

Ukuba into esiyifunayo kuphela ukuthoba umgangatho Ukuthumela imifanekiso ngeposi, umzekelo, siya kubhala lo myalelo ulandelayo, apho inani liyipesenti yomgangatho:

convert prueba.png -quality 95 prueba.jpg

Hlanganisa imisebenzi

Ukuba sifuna ukwenza iinguqulelo ezahlukeneyo yolu hlobo kumfanekiso, sinokuyenza ngokudibanisa imisebenzi. Apha ngezantsi unomzekelo wokutshintsha ubungakanani kwakhona, ujikeleze i-180º kwaye wehlise umgangatho womfanekiso ukuya kuma-95%.

convert prueba.png -resize 400×400 -rotate 180 -quality 95 prueba.jpg

Iqhubekeke ngeBash

Ubuntu bash

Kodwa eyona nto ndiyithandayo yile, hlela imifanekiso emininzi ngaxeshanye. Ngaphambi kokuhlela imifanekiso emininzi, kufanelekile ukuyifaka yonke kwifolda efanayo. Ndihlala ndibashiya kwidesktop, ke ndiqala ngokuchwetheza lo myalelo:

cd /home/pablinux/Escritorio

Nje ukuba singene ngaphakathi kwifolda, sibhala lo myalelo ulandelayo ukuze siphinde silinganise ubungakanani bayo yonke imifanekiso.

for file in *.png; do convert $file -resize 830 primera-$file; done

Ngokusisiseko, oko sikuthethayo «zonke iifayile ezingaphakathi kule folda kwaye zinefomathi ye .png; yenza uguquko ukusuka kubungakanani kwakhona ukuya kuma-830 ububanzi kwaye ungeze kuqala- kwigama lefayile; gqiba«. Ukuba uhlela imifanekiso emininzi, kunokuba kulunge kuwe. Luthini uluvo lwakho?


Umxholo wenqaku uyabambelela kwimigaqo yethu imigaqo yokuziphatha yokuhlela. Ukuxela impazamo cofa apha.

Izimvo ezi-3, shiya ezakho

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa.

*

*

  1. Uxanduva lwedatha: UMiguel Ángel Gatón
  2. Injongo yedatha: Ulawulo lwe-SPAM, ulawulo lwezimvo.
  3. Umthetho: Imvume yakho
  4. Unxibelelwano lwedatha: Idatha ayizukuhanjiswa kubantu besithathu ngaphandle koxanduva lomthetho.
  5. Ukugcinwa kweenkcukacha
  6. Amalungelo: Ngalo naliphi na ixesha unganciphisa, uphinde uphinde ucime ulwazi lwakho.

  1.   UJimmy Olano sitsho

    OKUQHELEKILEYO KUKHONA!
    Nangona bendinombono malunga "nokuguqula" isixhobo bendicinga ukuba ngumyalelo "wemveli" Ubuntu, ngoku namhlanje ndifundile ukuba yinxalenye ye-ImageMagick.

    Ndivuyisana nenqaku, lilula, ngqo ukuya kwinqanaba kwaye libhalwe kakuhle ukuze liqondwe ngokukhawuleza, nokuba ibash ingena ngaphandle kwengxaki!

    Enkosi kuwe.

    1.    UPablo Aparicio sitsho

      Molo jimmy. Enkosi ngengcaciso yakho. Usenokwenza izinto ezininzi, njengokufaka iziphumo, kodwa ndicinga ukuba ayikufanelanga ukusebenzisa iTheminali kuloo nto. Ukuba kufuneka sisebenzise iziphumo, kungcono ukuvula imifanekiso kwaye ubone ukuba senzani, okanye ndicinga njalo.

      A ubingelele.

  2.   Alfonso sitsho

    Enkosi pablo. Yinto ekufuneka ithathelwe ingqalelo ngalo naliphi na ixesha.