Hi,
I want to draw on an orginal photo and save this keeping the orginal sizes.
So if I have a image from 1024x768 and a device screen of 800x400 I would see the whole image that fits on the screen and draw on it whereafter I would save this (inclusive the drawings) into an image with the orginal sizes (1024x768)
I played around with it but I don't no how to do this. Has someone an idea how to solve this?
This is what I tried so far:
Dim bm As Bitmap
Dim iv As ImageView
Dim c As Canvas
bm = LoadBitmap(File.DirAssets, "photo.jpg")
iv.Initialize("")
iv.Gravity = Gravity.FILL
iv.Bitmap = bm
Activity.AddView(iv, 0, 0, 100%x, 100%y)
iv.Width = bm.Width
iv.Height = bm.Height
c.Initialize(iv)
'save new image
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal, "NewPhoto.jpg", False)
c.Bitmap.WriteToStream(out, 100, "JPEG")
out.Close
I want to draw on an orginal photo and save this keeping the orginal sizes.
So if I have a image from 1024x768 and a device screen of 800x400 I would see the whole image that fits on the screen and draw on it whereafter I would save this (inclusive the drawings) into an image with the orginal sizes (1024x768)
I played around with it but I don't no how to do this. Has someone an idea how to solve this?
This is what I tried so far:
Dim bm As Bitmap
Dim iv As ImageView
Dim c As Canvas
bm = LoadBitmap(File.DirAssets, "photo.jpg")
iv.Initialize("")
iv.Gravity = Gravity.FILL
iv.Bitmap = bm
Activity.AddView(iv, 0, 0, 100%x, 100%y)
iv.Width = bm.Width
iv.Height = bm.Height
c.Initialize(iv)
'save new image
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal, "NewPhoto.jpg", False)
c.Bitmap.WriteToStream(out, 100, "JPEG")
out.Close