-1

I'm looking for online or free image editing tool that allows you to scale images in the way Photoshop allows by context aware scaling. Simply I want to scale a image horizontally (in x axis) without scaling the image content but filling the added space with the image background color.

2 Answers2

2

I thought the OP was looking for "liquid image rescale" or a similar sounding name but rereading your post probably not. I do not understand why you need "context aware scaling".

Imagemagick can do it but it is a bit basic; it is command line and there is no easy way to protect certain areas: http://www.imagemagick.org/Usage/resize/#liquid-rescale

Gimp has a plugin but I have never used it: http://liquidrescale.wikidot.com/en:examples

Bonzo
  • 5,169
  • 1
  • 19
  • 27
  • I don't understand the question either, if you scale an image without scaling the content, I don't see why you want content-aware scaling... hopefully OP will clarify! – Mark Setchell Dec 03 '18 at 13:15
  • this is alright, however I fix it adding space and fill them manually. say you have a image with blue background and you want to scale the blue background without scaling whatever the content. it's bit of confusing as one can argue blue background is also content. Any way thanks for your time folks. – Hemal senerath rathnayake Dec 13 '18 at 05:32
0

I'm not 100% certain I understand your description, but you can do the following with ImageMagick which is installed on most Linux distros and is available for free for macOS and Windows.

Just in the Terminal, you can take the right-most column of an image and replicate a few hundred times to make the image wider.

So, if you start with this:

enter image description here

and run this:

convert start.png -gravity east \( +clone -crop 1x+0+0 -duplicate 400 \) +append result.png

You'll get this:

enter image description here


Or, you could grab the colour of the pixel at the top-left (or any other) corner and extend the background using that:

# Get colour of top-left pixel
tl=$(convert start.png -colorspace rgb -format "%[pixel:p{0,0}]" info:)

# Keeping original image at West side, extend image to East using colour found above
convert start.png -background  "$tl"  -gravity west -extent 1000x result.png

enter image description here

Mark Setchell
  • 191,897
  • 31
  • 273
  • 432