Skip to content

Instantly share code, notes, and snippets.

@davps
Last active August 30, 2017 12:38
Show Gist options
  • Select an option

  • Save davps/90d94e68355470f20bc6354a157f7f2a to your computer and use it in GitHub Desktop.

Select an option

Save davps/90d94e68355470f20bc6354a157f7f2a to your computer and use it in GitHub Desktop.

Revisions

  1. davps revised this gist Aug 30, 2017. 1 changed file with 13 additions and 5 deletions.
    18 changes: 13 additions & 5 deletions image manipulation scripts.md
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    #Installation
    # Installation

    ```
    brew install imagemagick
    @@ -10,7 +10,7 @@ brew install ufraw
    netpbm dcraw
    ```

    #Convert all .NET image extensions to .JPG
    # Convert all .NET image extensions to .JPG

    ```
    for img in *.NEF; do convert "$img" "$img.jpg"; done
    @@ -24,7 +24,7 @@ for img in *.NEF; do convert "$img" "./temp/$img.jpg"; done
    ```


    #Batch resize of images in a folder
    # Batch resize of images in a folder
    cd to the directory where your images are located (temp) after creating a new directory to hold the changed files (say, temp2)
    ```
    mogrify -path ./temp2/ -resize 40x40% -quality 60 -format jpg *.jpg
    @@ -34,10 +34,18 @@ this will take all png files in your current directory (temp), resize to 60% (of
    source: http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587


    #Add a logo image to a photo
    # Add a logo image to a photo
    ```
    composite -gravity NorthEast logo.png photo.jpg output.jpg
    ```

    Here is a good reference about compose
    http://www.imagemagick.org/Usage/compose/
    http://www.imagemagick.org/Usage/compose/


    # Gimp tips
    Suavizar bordes
    http://jafty.com/blog/fixing-jagged-image-edges-with-gimp/

    Cambiar resolucion de imagen
    http://guides.lib.umich.edu/c.php?g=282942&p=1888162
  2. davps revised this gist Jan 14, 2017. 1 changed file with 4 additions and 1 deletion.
    5 changes: 4 additions & 1 deletion image manipulation scripts.md
    Original file line number Diff line number Diff line change
    @@ -37,4 +37,7 @@ source: http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587
    #Add a logo image to a photo
    ```
    composite -gravity NorthEast logo.png photo.jpg output.jpg
    ```
    ```

    Here is a good reference about compose
    http://www.imagemagick.org/Usage/compose/
  3. davps revised this gist Jan 10, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion image manipulation scripts.md
    Original file line number Diff line number Diff line change
    @@ -36,5 +36,5 @@ source: http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587

    #Add a logo image to a photo
    ```
    composite -size 100x100 -gravity NorthEast logo.png photo.jpg output.jpg
    composite -gravity NorthEast logo.png photo.jpg output.jpg
    ```
  4. davps revised this gist Jan 10, 2017. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions image manipulation scripts.md
    Original file line number Diff line number Diff line change
    @@ -33,3 +33,8 @@ this will take all png files in your current directory (temp), resize to 60% (of

    source: http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587


    #Add a logo image to a photo
    ```
    composite -size 100x100 -gravity NorthEast logo.png photo.jpg output.jpg
    ```
  5. davps revised this gist Jan 9, 2017. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion image manipulation scripts.md
    Original file line number Diff line number Diff line change
    @@ -12,10 +12,18 @@ netpbm dcraw

    #Convert all .NET image extensions to .JPG

    ```for img in *.NEF; do convert "$img" "$img.jpg"; done```
    ```
    for img in *.NEF; do convert "$img" "$img.jpg"; done
    ```

    source: http://superuser.com/a/577661

    to move the converted JPG files on a ./temp folder:
    ```
    for img in *.NEF; do convert "$img" "./temp/$img.jpg"; done
    ```


    #Batch resize of images in a folder
    cd to the directory where your images are located (temp) after creating a new directory to hold the changed files (say, temp2)
    ```
  6. davps renamed this gist Dec 23, 2016. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  7. davps revised this gist Dec 23, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion script.md
    Original file line number Diff line number Diff line change
    @@ -10,7 +10,7 @@ brew install ufraw
    netpbm dcraw
    ```

    #Convert all .NET files to .JPG
    #Convert all .NET image extensions to .JPG

    ```for img in *.NEF; do convert "$img" "$img.jpg"; done```

  8. davps revised this gist Dec 23, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions script.md
    Original file line number Diff line number Diff line change
    @@ -11,7 +11,9 @@ netpbm dcraw
    ```

    #Convert all .NET files to .JPG

    ```for img in *.NEF; do convert "$img" "$img.jpg"; done```

    source: http://superuser.com/a/577661

    #Batch resize of images in a folder
    @@ -20,5 +22,6 @@ cd to the directory where your images are located (temp) after creating a new di
    mogrify -path ./temp2/ -resize 40x40% -quality 60 -format jpg *.jpg
    ```
    this will take all png files in your current directory (temp), resize to 60% (of largest dimension and keep aspect ratio), set jpg quality to 60 and convert to jpg.

    source: http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587

  9. davps revised this gist Dec 23, 2016. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions script.md
    Original file line number Diff line number Diff line change
    @@ -11,14 +11,14 @@ netpbm dcraw
    ```

    #Convert all .NET files to .JPG
    for img in *.NEF; do convert "$img" "$img.jpg"; done
    ```for img in *.NEF; do convert "$img" "$img.jpg"; done```
    source: http://superuser.com/a/577661

    #Batch resize of images in a folder
    cd to the directory where your images are located (temp) after creating a new directory to hold the changed files (say, temp2)

    ```
    mogrify -path ./temp2/ -resize 40x40% -quality 60 -format jpg *.jpg

    ```
    this will take all png files in your current directory (temp), resize to 60% (of largest dimension and keep aspect ratio), set jpg quality to 60 and convert to jpg.
    source: http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587

  10. davps revised this gist Dec 23, 2016. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions script.md
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,14 @@
    #Installation

    ``brew install imagemagick
    ```
    brew install imagemagick
    brew install ghostscript
    brew install ufraw
    netpbm dcraw
    `
    ```

    #Convert all .NET files to .JPG
    for img in *.NEF; do convert "$img" "$img.jpg"; done
  11. davps revised this gist Dec 23, 2016. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion script.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #Installation

    `brew install imagemagick
    ``brew install imagemagick

    brew install ghostscript

  12. davps revised this gist Dec 23, 2016. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions script.md
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,6 @@
    #Installation

    `
    brew install imagemagick
    `brew install imagemagick

    brew install ghostscript

  13. davps revised this gist Dec 23, 2016. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions script.md
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,11 @@

    `
    brew install imagemagick

    brew install ghostscript

    brew install ufraw

    netpbm dcraw
    `

  14. davps revised this gist Dec 23, 2016. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion script.md
    Original file line number Diff line number Diff line change
    @@ -1,10 +1,11 @@
    #Installation

    `
    brew install imagemagick
    brew install ghostscript
    brew install ufraw
    netpbm dcraw

    `

    #Convert all .NET files to .JPG
    for img in *.NEF; do convert "$img" "$img.jpg"; done
  15. davps revised this gist Dec 23, 2016. 2 changed files with 20 additions and 12 deletions.
    12 changes: 0 additions & 12 deletions script
    Original file line number Diff line number Diff line change
    @@ -1,12 +0,0 @@
    #Installation

    brew install imagemagick
    brew install ghostscript
    brew install ufraw
    netpbm dcraw


    #Convert all .NET files to .JPG
    for img in *.NEF; do convert "$img" "$img.jpg"; done
    source: http://superuser.com/a/577661

    20 changes: 20 additions & 0 deletions script.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    #Installation

    brew install imagemagick
    brew install ghostscript
    brew install ufraw
    netpbm dcraw


    #Convert all .NET files to .JPG
    for img in *.NEF; do convert "$img" "$img.jpg"; done
    source: http://superuser.com/a/577661

    #Batch resize of images in a folder
    cd to the directory where your images are located (temp) after creating a new directory to hold the changed files (say, temp2)

    mogrify -path ./temp2/ -resize 40x40% -quality 60 -format jpg *.jpg

    this will take all png files in your current directory (temp), resize to 60% (of largest dimension and keep aspect ratio), set jpg quality to 60 and convert to jpg.
    source: http://www.imagemagick.org/discourse-server/viewtopic.php?t=14587

  16. davps created this gist Dec 23, 2016.
    12 changes: 12 additions & 0 deletions script
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,12 @@
    #Installation

    brew install imagemagick
    brew install ghostscript
    brew install ufraw
    netpbm dcraw


    #Convert all .NET files to .JPG
    for img in *.NEF; do convert "$img" "$img.jpg"; done
    source: http://superuser.com/a/577661