user3888564
user3888564

Reputation: 31

How can I enlarge an image for Android without blurring it?

I use Eclipse and it makes a blurred image.

This image shows what I want:

Upvotes: 2

Views: 1400

Answers (5)

James
James

Reputation: 5

If you have a Photoshop, here's how I do it to preserve the hard edge and still look pixelated.

-Open the desired image in Photoshop -save as a copy and choose as a bitmap : .pbm file -now open the new .pbm file you just saved and select image size and change the image size there with preserve hard edges option.

If you don't have Photoshop, you can still do it with paint -Open your image, save as-> choose .bmp -then open the .bmp file you created, choose image size and resize the image

difference is the Photoshop is better to preserve the hard edges because they have a better interpretation. But paint is still good to get the job done, I had enlarge a 32*32 picture to 900*900 and still look pretty good.

Upvotes: 0

Akshit Rewari
Akshit Rewari

Reputation: 941

http://postimg.org/image/zaio51pr1/

I have enlarged it to a very large size and then reduced and sharpened the image using Photoshop.This is a simple trick called Supersampling

See if adding this in eclipse helps.

Contact me if u want an even higher resolution version , I'll mail you one

Upvotes: 0

Fargonaut
Fargonaut

Reputation: 791

There isn't really enough context given for me to provide a solution, but at the very least I can guess.

You want to load the image in a Drawable and call setFilterBitmap(false) before setting it to an ImageView.

A brief example:

public class MyActivity extends Activity {

private Drawable smallResource;

private ImageView resourceImageView;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    resourceImageView = (ImageView) findViewById(R.id.iv_resource);

    smallResource = getResources().getDrawable(R.drawable.small_resource);
    smallResource.setFilterBitmap(false);

    resourceImageView.setImageDrawable(smallResource);
}

Upvotes: 2

akshay bhange
akshay bhange

Reputation: 2504

Its Eclipse good quality that it is not making pixeled image.

Upvotes: 0

rupesh jain
rupesh jain

Reputation: 3430

Try reducing the image size and keep the imageview size fixed

Upvotes: 0

Related Questions