View Single Post
Posts: 123 | Thanked: 108 times | Joined on Oct 2008 @ Prague, Czech
#1
Hi,

Jolla gallery app create ambience by crop way. This is not good.

I wrote really simple linux shell script for expand standard 540x960 wallpaper jpeg file to Jolla Ambience 540x1600 jpeg by ImageMagick tool "convert". For use on Linux desktop. Jolla phone have not ImageMagick tools ..

Code:
#! /bin/bash

[ -z $1 ] && echo "Run: $0 file_name.jpg" ; exit 2

wpdir=`dirname "$1"`
wpname=`basename "$1"`

convert "${wpdir}/${wpname}" -crop 540x1+0+0 +repage "tmp_first.jpg"
convert "${wpdir}/${wpname}" -crop 540x1+0+959 +repage "tmp_last.jpg"
convert "tmp_first.jpg" -duplicate 115,0 -append -blur 0x8 "tmp_top.jpg"
convert "tmp_last.jpg" -duplicate 261,0 -append -blur 0x8 "tmp_end1.jpg"
convert "tmp_end1.jpg" -fill black -draw 'color 0,0 reset' "tmp_end2.jpg"
convert "tmp_top.jpg" "${wpdir}/${wpname}" "tmp_end1.jpg" "tmp_end2.jpg" -append "ambience_${wpname}"

rm -f tmp_*.jpg
Script simply read "name.jpg" from script parameter, create top blurred expansion from first pixel line, bottom blurred expansion from last line and rest black space, then montage all to one 540x1600 "ambience_name.jpg" file to current directory.

Good with clean first/last lines. Right input size 540x960 pixels not checked/fixed!
But on internet are thousand 540x960 pictures/wallpapers.

540x960_input_file_example and 540x1600_ambience_output

Any better solutions are welcome..

PS: sorry for my ugly english..

Last edited by Kaacz; 2014-03-03 at 19:11.
 

The Following 7 Users Say Thank You to Kaacz For This Useful Post: