دوستان من یه کد دارم که باهاش یه عکس رو از گالری انتخاب میکنم و کراپش میکنم. بعدش اون عکس کراپ شده رو تو یه ایمیج ویو نشون میدم. حالا میخوام بدونم چجوری باید همین فایل کراپ شده (که تو ایمیج ویو هم هست) رو یه جایی (مثلا تو dirinternal) سیو کنم. چون کد رو از سایت مرجع گرفتم و خودم ننوشتمش نمیدونم چی به چیه. دوستان کسی میتونه کمکم کنه؟
فکر کنم الآن فایل رو تو dirextenal دخیره میکنه. چجوری بیارمش تو dirinternal؟
اینم کد:
Sub Globals
Private ImageView1 As ImageView
Private Button1 As Button
Private Button2 As Button
Dim onoff As Boolean
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
End Sub
Sub Activity_Resume
If onoff = True Then
onoff=False
ImageView1.Visible = True
ImageView1.Bitmap = LoadBitmapSample(File.DirRootExternal, "1.jpg",ImageView1.Width, ImageView1.Height)
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub Button1_Click
Galeria(File.DirRootExternal, "1.jpg")
End Sub
Sub Galeria(Directory As String, PictureName As String)
Dim i As Intent
onoff = True
i.Initialize(i.ACTION_PICK, "")
i.SetType("image/*")
i.PutExtra("output", ParseUri("file://" & File.Combine(Directory, PictureName))) 'output folder you set OpenCam(File.DirRootExternal, "1.jpg")
i.PutExtra("crop", "true")
i.PutExtra("aspectX", 200)
i.PutExtra("aspectY", 200)
i.PutExtra("outputX", 200)
i.PutExtra("outputY", 100)
StartActivity(i)
End Sub
سوال
mnik 9
دوستان من یه کد دارم که باهاش یه عکس رو از گالری انتخاب میکنم و کراپش میکنم. بعدش اون عکس کراپ شده رو تو یه ایمیج ویو نشون میدم. حالا میخوام بدونم چجوری باید همین فایل کراپ شده (که تو ایمیج ویو هم هست) رو یه جایی (مثلا تو dirinternal) سیو کنم. چون کد رو از سایت مرجع گرفتم و خودم ننوشتمش نمیدونم چی به چیه. دوستان کسی میتونه کمکم کنه؟
فکر کنم الآن فایل رو تو dirextenal دخیره میکنه. چجوری بیارمش تو dirinternal؟
اینم کد:
Sub Globals Private ImageView1 As ImageView Private Button1 As Button Private Button2 As Button Dim onoff As Boolean End Sub Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("1") End Sub Sub Activity_Resume If onoff = True Then onoff=False ImageView1.Visible = True ImageView1.Bitmap = LoadBitmapSample(File.DirRootExternal, "1.jpg",ImageView1.Width, ImageView1.Height) End If End Sub Sub Activity_Pause (UserClosed As Boolean) End Sub Sub Button1_Click Galeria(File.DirRootExternal, "1.jpg") End Sub Sub Galeria(Directory As String, PictureName As String) Dim i As Intent onoff = True i.Initialize(i.ACTION_PICK, "") i.SetType("image/*") i.PutExtra("output", ParseUri("file://" & File.Combine(Directory, PictureName))) 'output folder you set OpenCam(File.DirRootExternal, "1.jpg") i.PutExtra("crop", "true") i.PutExtra("aspectX", 200) i.PutExtra("aspectY", 200) i.PutExtra("outputX", 200) i.PutExtra("outputY", 100) StartActivity(i) End Subلینک ارسال
به اشتراک گذاری در سایت های دیگر
0 پاسخ به این سوال تاکنون داده شده است
ارسالهای توصیه شده
بایگانی شده
این موضوع بایگانی و قفل شده و دیگر امکان ارسال پاسخ نیست.