I-YOGA, compress kunye nebatch eguqula imifanekiso kwiifomathi ezahlukeneyo

malunga neyoga yomfanekiso

Kwinqaku elilandelayo siza kujonga i-YOGA Image Optimizer. Yi le Isixhobo sokutshintsha iifoto kwiJPEG, PNG kunye neWEBP, kunye nokucofa ubungakanani befayile ngomgangatho olinganayo. Isixhobo sasimahla nesivulekileyo, esisekwe kwisixhobo somgca wokuyalela we-YOGA.

Umva we-YOGA usebenzisa ilayibrari yePillow Pillow ukuguqula imifanekiso ibe yiPNG, JPEG okanye iWebP. Sebenzisa ithala leencwadi Guetzli UGoogle ukuvelisa iifayile zeJPEG, ezingama-20% ukuya kuma-30% amancinci kunokusebenzisa yiblpeg. Amathala eencwadi UZepflipng y yewebwebp IiGoogle zisetyenziselwa ukwandisa ezinye iifomati zemifanekiso. Isixhobo somgca wokuyalela sikwaxhasa ukuguqulwa kwemodeli ye-3D kunye nokusebenza usebenzisa ithala leencwadi Uncedo.

Iimpawu ngokubanzi ze-YOGA Image Optimizer

ukhetho lwenkqubo

  • Isiphelo sangaphambili se-YOGA sibonelela kulula ukuyisebenzisa ujongano lomzobo ukwenza ukuguqulwa komfanekiso kunye nenkqubo yokwenziwa kweGnu / Linux kunye neWindows.
  • Iya kusivumela vula ibhetshi yemifanekiso, ubonise iithonjana zabo, igama kunye nobungakanani befayile yokufaka, kunye negama lokuphuma kunye nefomathi yefayile.
  • I-YOGA Image Optimizer ixhasa iifomathi ezahlukeneyo njengegalelo, kunye Unako ukuvelisa iifayile zeJPEG, zePNG kunye nezeWebhu (Zombini ngelahleko kwaye ngaphandle kwelahleko).

Ukubaleka kweyoga

  • Ngaphambi kokucofa ku 'Lungiselela' thina izakuvumela ukuba ukhethe ifomathi yemveliso kwaye usete inqanaba loxinzelelo kumfanekiso ngamnye.
  • Siza kuba nenkxaso yemisonto emininzi. Siza kukwazi setha ukuba zingaphi ii-CPU cores oza kuzisebenzisa.
  • Unikeza a Imo emnyama.
  • Ipateni yemveliso ngokwezifiso

Faka i-YOGA Image Optimizer kwi-Ubuntu

malunga neyoga yomfanekiso

Kwi-Gnu / Linux, le software inokufakwa kwifayile yePlppak okanye usebenzisa i-pip3.

Ukuhamba ngephakheji yePlppak

Ukuba usebenzisa Ubuntu 20.04 kwaye awunayo le teknoloji efakwe kwikhompyuter yakho, ungaqhubeka Isikhokelo ukuba ugxa wakhe ubhale kule bhlogi kwithuba elidlulileyo ukuyenza ikwazi.

Xa ungafaka Iiphakheji zeplppakKuya kufuneka uvule i-terminal (Ctrl + Alt + T) kwaye usebenzise oku kulandelayo faka umyalelo:

faka i-yoga flatpak

flatpak install flathub org.flozz.yoga-image-optimizer

Emva kofakelo, sinako fumana isiqalisi senkqubo kwimeko yemizobo.

umthumeli weyoga

Khupha ngaphandle

Ukuba le nkqubo ayiqinisekisi, ingasuswa ngokulula ukusebenzisa lo myalelo ulandelayo kwi-terminal (Ctrl + Alt + T):

khipha i-yoga flatpak

flatpak uninstall --delete-data org.flozz.yoga-image-optimizer

Sebenzisa ipip3

Kulabo abangazithandiyo iiphakheji zePlppak, banethuba lokwenza njalo Sebenzisa ipayipi3. Nokuba olu khetho, SUKWENZA indlela emfutshane yokwenza isicelo Ukuyiqala kwidesktop.

Kuqala, siza kuvula i-terminal (Ctrl + Alt + T) kwaye kuyo siza kwenza lo myalelo ulandelayo faka iilayibrari ezifunekayo:

ufakelo lokuxhomekeka

sudo apt install git build-essential python3 python3-dev python3-pip libgirepository1.0-dev libcairo2-dev pkg-config gir1.2-gtk-3.0

Emva koko sinako faka ipakeji yesicelo usebenzisa lo myalelo:

faka i-yoga ngombhobho3

sudo pip3 install yoga-image-optimizer

Njengoko benditshilo apha ngasentla, iphakheji yombhobho ayinakho ukufikelela ngqo kwisicelo. Ngesi sizathu Kuya kufuneka usebenzise lo myalelo ulandelayo ukuze uqalise kwisiphelo sendalo kwaye wenze ifayile yedesktop:

yoga-image-optimizer

Khupha ngaphandle

ukuba susa iphakheji yale app, siya kufuna kuphela ukuvula i-terminal (Ctrl + Alt + T) kwaye sisebenzise umyalelo kuyo:

khipha i-yoga ngombhobho3

sudo pip3 uninstall yoga-image-optimizer

Ukusetyenziswa ngokusisiseko kwe-YOGA ukusuka kwisiphelo sendlela

Ukongeza ekusebenziseni imeko yemizobo, endicinga ukuba ayinanto ingako ukuyichaza, sinako nathi Sebenzisa i-terminal ukuphucula imifanekiso yethu. Eyona ndlela ilula yokwandisa umfanekiso ukusuka kwisiphelo kukusebenzisa lo myalelo ulandelayo:

ukuguqulwa komfanekiso ukusuka kwisiphelo sendlela

yoga image imagen-entrada.png imagen-salida.webp

Xa ifomathi yemveliso ingachazwanga kwisiphelo sendlela, i-YOGA ivelisa umfanekiso kunye nefomathi efanayo nomfanekiso wokufaka. Yi-PNG, i-JPEG kunye ne-WEBP kuphela exhaswa njengegalelo, xa ifomathi yemveliso ingachazwanga ngokucacileyo.

Ifomathi yemveliso inokuchazwa kusetyenziswa ifayile ye- Ukhetho lokhetho lwefomathi:

ukuguqulwa komfanekiso

yoga image --output-format=jpeg imagen-entrada.png imagen-salida.jpeg

Ezi fomathi zilandelayo ziyaxhaswa:

  • imvelaphi: Oku kungagqibekanga. Ifomathi yokuvelisa iya kufana nomfanekiso wokufaka.
  • autoIfomathi yemveliso ikhethwe ngokuzenzekelayo. I-YOGA iya kuvelisa i-PNG ukuba umfanekiso wokufaka usebenzisa ukungafihli, kungenjalo uya kuvelisa i-JPEG.
  • png: ivelisa umfanekiso wePNG.
  • jpeg: ivelisa umfanekiso weJPEG.
  • iwebhu-Yila umfanekiso weWEBP olahlekileyo.
  • webpl: Yenza umfanekiso weWEBP ongalahlekiyo

Le nkqubo ikwavumela yenza ubungakanani kwakhona kwimifanekiso ngokukhetha-ukukhetha kwakhona:

bhala kwakhona umfanekiso

yoga image --resize=512x512 imagen-entrada.png imagen-salida.png

Kule meko, ukuba ububanzi nokuphakama kunexabiso elifanayo, akufuneki sichaze zombini.

I-YOGA iyakusivumela setha umgangatho ofunekayo weefayile zeJPEG kunye neWebP ezinokuveliswa ngokhetho -Umgangatho wepeg y -Umgangatho wewebhu. Olu khetho luthatha inani eliphakathi phakathi kuka-0 (iifayile ezisezantsi ezisezantsikunye ne-100 (iifayile ezikumgangatho ophezulunjengeparameter:

tshintsha umgangatho womfanekiso

yoga image --output-format=jpeg --jpeg-quality=84 imagen-entrada.png imagen-salida.jpg

Ukuba ungumsebenzisi we-Gnu / Linux, olu lukhetho olunomdla lokwandisa imifanekiso yakho, ekwasimahla kunye nomthombo ovulekileyo. Inga wazi ngakumbi ngale nkqubo kwi iphepha lewebhu okanye kwi Indawo yokugcina kwiGitHub yeprojekthi.


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

Yiba ngowokuqala ukuphawula

Shiya uluvo lwakho

Idilesi yakho ye email aziyi kupapashwa. ezidingekayo ziphawulwe *

*

*

  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.