Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Nov 15 '11 at 22:18

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

add comment

3 Answers

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
add comment

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.