Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

320
Views
Glide: ¿Cómo cambiar el tamaño y guardar el gif como archivo usando Glide v4?

Quiero cambiar el tamaño del archivo gif y guardarlo. Traté de usar algunos métodos sugeridos pero dan error y más tarde me di cuenta de que algunos de los métodos están obsoletos en Glide v4

 byte[] bytes = Glide.with(context) .asGif() .load(url) .toBytes() .into(250, 250) .submit() .get();

En el código anterior, convertir las matrices en un archivo da un archivo gif en blanco con un tamaño de 4.x MB

 File file = Glide.with(reactContext) .asFile() .load(url) .override(512, 512) .fitCenter() .into(512,512) .get();

Y

 File file = Glide.with(reactContext) .asFile() .load(url) .apply(new RequestOptions().override(512, 512)) // .diskCacheStrategy(DiskCacheStrategy.ALL) .submit(512,512) .get();

Y

 File file = Glide.with(reactContext) .asFile() .load(url) // .override(512, 512) .fitCenter() .submit(512,512) .get();

Pero el código anterior mantiene el ancho y la altura tal como están.

Detalles:

 Glide version : 4.13.0

Comparta el código adecuado o sugiera algo para cambiar el tamaño del gif (para guardarlo como archivo en lugar de mostrarlo).

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!