ronanrodrigo/Sensazonal

Food images

Closed this issue · 1 comments

Find and download a photo for each food. The photo must be licensed to use.

Tasks

  • Find and download photos
  • Padronize sizes
  • On-demanded Resources and/or add images to project

Script created to generate miniatures given a size and adjusting with aspect-fit. To use is necessary to install imagemagick.

brew instal imagemagick
#!/usr/bin/env bash

size=$1 # Ex. 200x200
path_origin=$(realpath $2)
path_destiny=$(realpath $3)
path_current=$PWD

mkdir -p $path_destiny
cd $path_origin

mogrify -path $path_destiny \
    -resize $size^ \
    -gravity center \
    -extent $size^ \
    *

cd $path_current