Question

hasexxl1988

Active Member
Licensed User
Longtime User
Hello,
When I try using the following code to save a bitmap file, the error message is seen on the screenshot below. Who knows a solution?

Code:
Dim Obj1, Obj2 As Reflector
Dim bmp As Bitmap
Dim c As Canvas
Obj1.Target = Obj1.GetActivityBA
Obj1.Target = Obj1.GetField("vg")
bmp.InitializeMutable(Activity.Width, Activity.Height)
c.Initialize2(bmp)
Dim args(1) As Object
Dim types(1) As String
Obj2.Target = c
Obj2.Target = Obj2.GetField("canvas")
args(0) = Obj2.Target
types(0) = "android.graphics.Canvas"
Obj1.RunMethod4("draw", args, types)
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal, "1.jpg", False)
bmp.WriteToStream(out, 100, "JPEG")
Out.Close
 

Attachments

  • Screenshot_2012-05-15-18-58-35.png
    Screenshot_2012-05-15-18-58-35.png
    70.5 KB · Views: 385
no, is read from the bitmap image in the program. So there is no image file is opened and saved again, but as a character-only program created


EDIT:
I would now ask how I can create one image file to the program and then the image can save it
 
Last edited:
Upvote 0
Back
Top