-3

I can load Images from my assets folder just fine, but now I want to scale the Image (originally 400 x 240, want it to be 800 x 480).

I can't do this with Bitmaps because of 2 reasons: (1), can't seem to create Bitmap from a file without knowing the whole path from C:\ to Assets folder, which is dumb since the whole path is gonna change depending on where app is installed; and (2), can't find a way to convert an Image to a Bitmap. And yes, i've looked up on StackOverflow how to try those/similar things, been looking them up and trying again and again for 3 days all day, no luck.

So how to scale Images? I don't understand why it's so hard to manipulate these things, and what is the difference between Bitmap and Image anyway?

Yes, I'm new to Java/Android as of 3 days ago, but I've done a lotta work in C# and other langs. PS, I know how to create and use Canvas and Paint objects. Ideally, I just need a Image scr_scale_image(Image img, int ScaleX, int Scale y) method.

thanks for any help.

DrZ214
  • 486
  • 5
  • 19

1 Answers1

0

try imagemagick, which provides an api for java (JMagick) - http://www.imagemagick.org/script/index.php

Raúl
  • 1,542
  • 4
  • 24
  • 37