This is very much a noob question.
With the benefit of this answer from a different question, I have created a class which theoretically takes a BMP image and resizes it to the size of the image, rather than the (blank) background.
However, I can't work out how to run the class and reference an image which is saved as a drawable.
I've tried
package com.example.trimmer_test;
import android.media.Image;
public class Activity_main {
"@drawable/imagename"
}
After some searching, I thought that I had to use the getResource method to import the image, so I tried
package com.example.trimmer_test;
import android.media.Image;
public class Activity_main {
Activity_main.getResource("@drawable/imagename")
}
But this brings up a "cannot resolve symbol 'getResource'" error.
I've tried what feels like a million variants of this and can't figure it out.
Apologies for what I imagine is a basic question, but I have searched thoroughly and can't find the answer anywhere.