Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've downloaded a photo with a pixel size of 300x366. It is a jpeg, at 27.7Kb. How can I enlarge the image's size, without distorting it?

Using Paint doesn't seem to work for this.

share|improve this question

migrated from Nov 15 '11 at 22:18

This question came from our site for professional and enthusiast programmers.

Firstly you may want to check this website which describes basic image scaling alghoritms. Of course there is also this wiki page.

Secondly there is seam carving. This YouTube video shows its possibilities.

There is also very helpful open source library for graphics manipulation which is called OpenCV. You probably might need to implement seam carving by yourself but it might be easier with OpenCV.

And if you don't need to have real time functionality or simply you don't want to write code by yourself then you might try GIMP with this plugin. I haven't checked it but it looks promising :).

share|improve this answer

Depending on how large you want the image, this could be impossible. You could try with an application such as Photoshop, but the results will still not be perfect. Blurring the photo afterward would take away rough edges, but you would lose detail.

If you don't have Photoshop, you could download the 30-day trial from Adobe. Failing that, post the image online with the size you want and I'll do it for you.

Also - I assume you can't get hold of a larger source image?

share|improve this answer
yes,the size is of 300 X 360,27.7kb only. – Sukanya Nov 15 '11 at 11:50

You can expand the images dimensions using a tool such as IrfanView or similar. However, distortion will occur. There is only enough information in that picture to fill the 300x360 pixels of the original image, and much of that is compressed because JPEG is a compressed image format. Enlarging the image will require the program to guess at that information to use to fill up more space, and these guesses will not be true to the original picture the image was derived from.

In general, the rule of thumb when dealing with changing image sizes is that once you've taken out enough information to make an image smaller, you cannot take that same image and make it larger without experiencing sometimes significant distortion.

share|improve this answer

You must log in to answer this question.