Mechasoft: Blog de Matías J. Magni

…dedicado al Open Source y al delirio del Autor…

  • Matías J. Magni

  • RSS Ubuntu

    • Security Team Weekly Summary: August 17, 2017 17/08/2017
      The Security Team weekly reports are intended to be very short summaries of the Security Team’s weekly activities. If you would like to reach the Security Team, you can find us at the #ubuntu-hardened channel on FreeNode. Alternatively, you can mail the Ubuntu Hardened mailing list at: ubuntu-hardened@lists.ubuntu.com During the last week, the Ubuntu Securit […]
    • How to set up Kubernetes on any cloud and monitor your apps with Weave 17/08/2017
      On August 2, Luke Marsden (Weaveworks) and Marco Ceppi (Canonical) presented a webinar on how to Speed up your software development lifecycle with Kubernetes. In the session they described how you can use conjure-up and Weave Cloud to set up, manage and monitor an app in Kubernetes. In this tutorial we’re going to show you […]
    • Ubuntu Foundations Development Summary – August 16, 2017 16/08/2017
      This newsletter is to provide a status update from the Ubuntu Foundations Team. There will also be highlights provided for any interesting subjects the team may be working on. If you would like to reach the Foundations team, you can find us at the #ubuntu-devel channel on freenode. Highlights Updated cloud images have been released […]
    • Kernel Team Summary- August 16, 2017 16/08/2017
      Development (Artful / 17.10) We intend to target a 4.13 kernel for the Ubuntu 17.10 release. The artful kernel is now based on Linux 4.11. The Ubuntu 17.10 Kernel Freeze is Thurs Oct 5, 2017. The kernel in the artful-proposed pocket of the Ubuntu archive has been updated to v4.12.7 The kernel in the Artful […]
    • Ubuntu Server Development Summary – 15 Aug 2017 15/08/2017
      Hello Ubuntu Server! The purpose of this communication is to provide a status update and highlights for any interesting subjects from the Ubuntu Server Team. If you would like to reach the server team, you can find us at the #ubuntu-server channel on Freenode. Alternatively, you can sign up and use the Ubuntu Server Team […]
  • RSS LUGMen

    • Se ha producido un error; es probable que la fuente esté fuera de servicio. Vuelve a intentarlo más tarde.
  • Archivos

Archive for 16 mayo 2011

Cambiar el tamaño a una lista de imágenes en Linux

Posted by Matías J. Magni en 16/05/2011

Bueno este artículo está destinado a aquellos desarrolladores web que como yo se encuentran a menudo con el problema de cambiar el tamaño de una lista de imágenes de una sóla vez, ya sea porque un módulo de una galería trabaja con cierto tamaño en las imágenes o para reducir el tráfico en su sitio.

Aquí les dejo el script que cambia el tamaño de las imágenes contenidas en un directorio y las guarda dentro del directorio images-resized:


mkdir images-resized
for file in *.$1
do
convert "$file" -resize $2\! +profile '*' "images-resized/${file%%.$1}.$1"
done

Ejecución del script:

$ ./resize.sh <extension_archivos> <dimension>

Ejemplo de ejecución del script:

$ ./resize.sh jpg 640×480

Posted in Uncategorized | Leave a Comment »