1. Black Friday Sale - 50% off

    B4A Standard for $29 instead of $59!
    Buy Now
    Dismiss Notice

B4A Library CropImageView V1.0

Discussion in 'Additional libraries, classes and official updates' started by DonManfred, Mar 26, 2015.

  1. DonManfred

    DonManfred Expert Licensed User

    It is not possible with this lib, sorry...

    If you find a better library (java) i can try to do a wrap for it.
     
  2. scsjc

    scsjc Well-Known Member Licensed User

    thanks !!!
     
  3. Rusty

    Rusty Well-Known Member Licensed 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:
    Code:
    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
     
  4. DonManfred

    DonManfred Expert Licensed User

    My guess is that the camera is still in use by your camera ex class in first activity
     
  5. Rusty

    Rusty Well-Known Member Licensed User

    Code:
    Sub btnCrop_Click
        camEx.CloseNow
        camEx.Release
        
    StartActivity(Crop)
    End Sub
    This is the code calling the startactivity(crop)
     
  6. DonManfred

    DonManfred Expert Licensed User

    Try to move the StartActivity to a new Sub And Use callsubplus to start the Sub in 500ms
     
  7. Rusty

    Rusty Well-Known Member Licensed User

    I moved it to a new sub and called callsubplus and waited 1000ms
    Code:
    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 ,
     
  8. DonManfred

    DonManfred Expert Licensed User

    hmm, ok. I´ll investigate
     
  9. Rusty

    Rusty Well-Known Member Licensed 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
     
    DonManfred likes this.
  10. Rusty

    Rusty Well-Known Member Licensed 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
     
  11. DonManfred

    DonManfred Expert Licensed User

    Unfortunatly no.
     
  12. Rusty

    Rusty Well-Known Member Licensed User

    Thanks Don!
    Can the background image be moved behind the rectangle to center it appropriately?
     
  13. DonManfred

    DonManfred Expert Licensed User

    again no. Sorry, there is no method in the library to do...
     
    Rusty likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice