Ambience made from gallery bug

Hi all, I just wanted to ask if my problem has some kind of solution. The problem is, that when I want to make ambience from picture in gallery, it wont use whole picture, but only some kind of “zoomed part”.
Said other way, if I have a picture in gallery with resolution 1920x1080 (my phone has this resolution), it is not showed in whole size, I see let´s say middle square.
Could this be fixed somehow with patch or something? I hate this behavior, all other phones I´ve ever had were working properly - If I had picture with right resolution, whole picture was visible as wallpaper. Not like on Sailfish OS.

1 Like

Ambiance pictures should be square, and if they are not, they get cropped. Yes,then they will be cropped further to fit to the display too. One reason to need a sqaure is so they can show the same things right-way-up in landscape too.


I use this script to create square images for Ambiences, and sometimes Imageworks to color the black parts:


# Xperia 10 horiz. res.
ax=$(( $a + 300 ))
#im_opts="-background rgb(255,0,255) -resize $sizea -gravity center -extent $sizeax"
im_opts="-background rgb(0,0,0) -resize $sizea -gravity center -extent $sizeax"

echo convert $im_opts $in $out
convert $im_opts $in $out
1 Like

There are crop settings, no need for scripts, unless I misunderstand something.

The aspect ratio can be set to one of the following, after tapping on the little pen (edit) icon;

Yes a square crop can work, but the script method makes a square by letterboxing it, leaving the full content of the original image intact.

1 Like

Where is that? 

On any image in Gallery, then tap the crop icon. (like a box with diagonal line through it).

Oh, i see. I was thinking Ambiances had grown a setting that i had missed. Thanks.

That box is actually meant to to symbolize an angle finder. :wink:


For those who do not want to script, here’s a small guide for Imageworks:

  1. launch Imageworks
  2. assuming your image is in portrait orientation, but NOT 21:9 aspect ratio:
  3. rotate image to landscape mode (this is because there is no portrait crop mode in Imageworks)
  4. crop, choosing 21:9 aspect ratio
  5. rotate to landscape again
  6. go to the rescale screen, choose 1:1 and either ‘color’ or ‘blur’ fill modes
  7. save
  8. go to gallery, open newly saved image, use as ambience
1 Like

This is not the case?! a) Open image, b) select the ‘angle finder’/crop icon, c) select 1:1 and d) checkbox. Bingo, a square cropped image. I’m not sure why you had the impression it can’t be 1:1 cropped?

EDIT: You mean the aspect ratio 21:9 is not appropriate on a portrait image, I believe? But 21:9 is not going to be appropriate for all devices, or?

Ok, I just tested the ‘simple’ case of a portrait image, Cropped as in my last post with only the 1:1 setting and used it for an ambience. It seems to be reasonable, Or are you ‘always’ aiming at showing the whole image? personally, I always want ‘full bleed’.

This image obviously gets cropped on the sides depending on the device.

Really magnificent! Which cave is that?

Home - Grotte de la Salamandre It’s worth the stop if you’re in Le Gard, Occitane!

1 Like

I think all of this still didn´t solve my problem. So one more time - is any way to make my phone use image with 1920x1080? And in perfect case to prevent image from rotating to landscape? I don´t care image wont be rotated in landscape.

Perhaps you could make a drawing to illustrate what the result is that you want to achieve vs. the result that you are getting? Because it seems obvious that you aren’t going to be able to fit a landscape 16:9 image on a 9:21 portrait display without at least cropping some portion of it? I.e what does the input image look like, and how do you want it to show on the phone?


Great script. This solve my problem with Sailfish automatic cropping.
Little improve : get height with identify and meancolor :

        H=$(identify $art.jpg |cut -f 3 -d ' '|cut -d'x' -f2 )
        convert -background "$(convert $art.jpg -resize 1x1\! -format "%[pixel:u]\n" info:)" -resize ${H}x${H} -gravity center -extent ${H}x${H} $art.jpg ambi_$art.jpg

Yes, whole image is better for me because I will make my own wallpaper on my PC and then sync it to phone and use as wallpaper. Mouse is much more powerful tool than touch display :wink:

Here I made an example

There is ‘manual’. That allows you to enter arbitrary values. I am, just for the hell of it, implementing other presets (9:21) and ‘invert’ as a button so that you can select 21:9 and just hit a ‘left’ arrow to invert the ratio.

1 Like