Mechasoft: Blog de Matías J. Magni

…dedicado al Open Source y al delirio del Autor…

  • Matías J. Magni

  • RSS Ubuntu

    • Tutorial: Continuous delivery of snaps with Circle CI 19/01/2018
      Bullet-proof continuous delivery of software is crucial to the health of your community, more than a way to run manual tests, it also enables your early adopters to test code and give feedback on it as soon as it lands. You may be already using to do so for snaps, but in some cases, […]
    • Canonical brings Slack to the snap ecosystem 18/01/2018
      The digital workspace will now be available to all Linux users London, UK – 18th January 2018 – Canonical, the company behind Ubuntu, today announced the first iteration of Slack as a snap, bringing collaboration to open source users. Slack is an enterprise software platform that allows teams and businesses of all sizes to communicate effectively. Slack work […]
    • Spectre Mitigation Updates Available for Testing in Ubuntu Proposed 17/01/2018
      Canonical holds Ubuntu to the highest standards of security and quality.  This week we published candidate Ubuntu kernels providing mitigation for CVE-2017-5715 and CVE-2017-5753 (ie, Spectre / Variants 1 & 2) to their respective -proposed pockets for Ubuntu 17.10 (Artful), 16.04 LTS (Xenial), and 14.04 LTS (Trusty).  We have also expanded mitigation to […]
    • LXD Weekly Status #30 16/01/2018
        Introduction The main highlight for this week was the inclusion of the new proxy device in LXD, thanks to the hard work of some University of Texas students! The rest of the time was spent fixing a number of bugs, working on various bits of kernel work, getting the upcoming clustering work to go […]
    • Monitor your Kubernetes Cluster 16/01/2018
      This article originally appeared on Kevin Monroe’s blog Keeping an eye on logs and metrics is a necessary evil for cluster admins. The benefits are clear: metrics help you set reasonable performance goals, while log analysis can uncover issues that impact your workloads. The hard part, however, is getting a slew of applications to work […]
  • 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
convert "$file" -resize $2\! +profile '*' "images-resized/${file%%.$1}.$1"

Ejecución del script:

$ ./ <extension_archivos> <dimension>

Ejemplo de ejecución del script:

$ ./ jpg 640×480


Posted in Uncategorized | Leave a Comment »