B4A Library CropImageView V1.0

Rusty

Well-Known Member
Licensed User
Longtime User
Hi Don,
I am using your crop library (which works great) but I am combining it with CameraEX.
I want to take a photo, save it to a file, then allow the user to crop it and save it.
when I combine the two:
  • CameraEx takes the photo and saves it
  • I then startactivity(crop), which is your demo
  • when the LoadLayout("Layout1") executes, I get

Line 19 is:
B4X:
Sub Activity_Create(FirstTime As Boolean)
 LINE 19 >>---->   Activity.LoadLayout("layout1")
                            
End Sub
any ideas what is in the Layout1 (your original layout) that might be causing this?
Thanks Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
B4X:
Sub btnCrop_Click
    camEx.CloseNow
    camEx.Release
    StartActivity(Crop)
End Sub
This is the code calling the startactivity(crop)
 

Rusty

Well-Known Member
Licensed User
Longtime User
I moved it to a new sub and called callsubplus and waited 1000ms
B4X:
Sub btnCrop_Click
    camEx.CloseNow
    camEx.Release
    Dim callPlus As CallSubPlus
    callPlus.Initialize
    callPlus.CallSubPlus(Me, StartAct, 1000)
End Sub

Sub StartAct
    StartActivity(Crop)
End Sub
Still no happiness.
I have even tried removing the civ from the layout1.bal file and adding it in code, but it dies on that too...
Thanks ,
 

Rusty

Well-Known Member
Licensed User
Longtime User
I looked at the Module attributes and I must have overlaid the #AdditionalRes: ..\resources
I added that back and now it seems to load
Sorry to waste your time
Thanks for the help.
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Hi Don,
Your class works great
Is there a way to move the crop rectangle to a specific x, y coordinate (as center)?
Thanks
Rusty
 

Rusty

Well-Known Member
Licensed User
Longtime User
Thanks Don!
Can the background image be moved behind the rectangle to center it appropriately?
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…