Monday, October 28, 2013

Mega Free Wallpapers Updates

Mega Free Wallpapers Updates


Bash script to sort wallpapers and pictures by their ratios and move them to subfolders

Posted: 28 Oct 2013 01:06 PM PDT

If you have a bunch of pictures which you want to sort and move into sub-folders according to their ratios (such as portrait, landscape, 16-10 wallpapers, 16-9 wallpapers etc), then this bash script I just wrote and successfully used to sort over a thousand pictures in just a couple of minutes may be the thing you need. It runs from the command line, and can be easily modified to suit other ratios. It creates the sub-folders first, and then reads the dimensions of each image and moves it to the appropriate sub-directory. It is written on a Linux PC and requires ImageMagick (installed by default on most distros).


CODE STARTS HERE    #!/bin/bash    # wallpaper and other JPEG pictures sorting script by Mega Free Wallpapers  # - http://tinyurl.com/MegaFreeWalls    # you MUST navigate to the image folder first before you run this script    mkdir -p portraits landscapes 4-3 16-9 16-10 #folder names according to ratio    for f in *.jpg; do    W=`identify -format "%w" "$f"`  H=`identify -format "%h" "$f"`  ratio=$(echo "scale=6; $W / $H" | bc) #scale= is the number of decimal places    # The mathematical ratios to 6 decimal places    sqr=1.333333 #4-3 ratio eg. 1600x1200  pst=1.777777 #16-9 (PlayStation) ratio eg. 1920x1080  wide=1.600000 #16-10 widescreen ratio eg. 1920x1200    # Analyse each picture and if it matches one of the above ratios  # move it to that folder, otherwise move to general landscape or portrait folder        if [[ $ratio = $sqr ]]; then      mv "$f" 4-3/"$f"      elif [[ $ratio = $pst ]]; then      mv "$f" 16-9/"$f"      elif [[ $ratio = $wide ]]; then      mv "$f" 16-10/"$f"      elif [[ "$H" -lt "$W" ]]; then #these lines must go after the numerical ratios      mv "$f" landscapes/"$f"  else       mv "$f" portraits/"$f"  fi  done    exit 0    CODE ENDS HERE  

I was using a Python script called PyImgSort 0.1.6 : Python Package Index, however that one can be a bit complicated to edit if you want to change the ratios being sorted. The one I’ve written makes it nice and simple by keeping everything in the one file. The quotation marks around the $f variable mean that the script should work okay on file names with spaces in them. Hopefully you might find it helpful if you have a large number of pictures to sort.

Females - M - Megan Fox - 1920x1200 widescreen - Page 19

Posted: 28 Oct 2013 06:18 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 19

Females - M - Megan Fox - 1920x1200 widescreen - Page 18

Posted: 28 Oct 2013 06:14 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 18

Females - M - Megan Fox - 1920x1200 widescreen - Page 17

Posted: 28 Oct 2013 05:57 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 17

Females - M - Megan Fox - 1920x1200 widescreen - Page 16

Posted: 28 Oct 2013 05:20 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 16

Females - M - Megan Fox - 1920x1200 widescreen - Page 15

Posted: 28 Oct 2013 05:09 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 15

Females - M - Megan Fox - 1920x1200 widescreen - Page 14

Posted: 28 Oct 2013 04:57 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 14

Females - M - Megan Fox - 1920x1200 widescreen - Page 13

Posted: 28 Oct 2013 04:46 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 13

Females - M - Megan Fox - 1920x1200 widescreen - Page 12

Posted: 28 Oct 2013 04:35 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 12

Females - M - Megan Fox - 1920x1200 widescreen - Page 11

Posted: 28 Oct 2013 04:22 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 11

Females - M - Megan Fox - 1920x1200 widescreen - Page 10

Posted: 28 Oct 2013 04:11 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 10

Females - M - Megan Fox - 1920x1200 widescreen - Page 09

Posted: 28 Oct 2013 03:54 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 09

Females - M - Megan Fox - 1920x1200 widescreen - Page 08

Posted: 28 Oct 2013 03:38 AM PDT

Download these free desktop wallpapers at Mega Free Wallpapers: Females:M:Megan Fox:1920x1200 widescreen:Page 08

Full-sized images are accessible again

Posted: 28 Oct 2013 01:43 AM PDT

I just received an email from ImgBox advising that the problem viewing full-sized pictures has been fixed.

If you are having problems viewing the full-sized wallpapers

Posted: 28 Oct 2013 12:51 AM PDT

I only just noticed that (from my PC at least) there seems to be a problem accessing the full-sized pictures on imgbox (the image host). It seems to be a problem with JPEG images only as I was able to open some GIF files uploaded by others, while no JPEGs were accessible.

I’ve emailed the support team at imgbox with details. Hopefully it is just a file permissions problem which can be easily fixed.