Android Question Path Camera Size

Discussion in 'Android Questions' started by Croïd, Jul 12, 2015.

  1. Croïd

    Croïd Active Member Licensed User

    How find direct path to open the resolution & quality settings for camera ?

    Or how can I display all resolutions in a panel ? (not step by step with btnPictureSize_Click)


    Sub btnPictureSize_Click
    Dim pictureSizes() As CameraSize = camEx.GetSupportedPicturesSizes
    Dim current As CameraSize = camEx.GetPictureSize
    For i = 0 To pictureSizes.Length - 1
    If pictureSizes(i).Width = current.Width And pictureSizes(i).Height = current.Height Then Exit
    Dim ps As CameraSize = pictureSizes((i + 1Mod pictureSizes.Length)
        camEx.SetPictureSize(ps.Width, ps.Height)
    ToastMessageShow(ps.Width & "x" & ps.Height, False)
    End Sub
    Last edited: Jul 12, 2015
  2. MaFu

    MaFu Well-Known Member Licensed User

    Where's the problem?
    Use a spinner or listview and fill it with the result from camEx.GetSupportedPicturesSizes.
    On select set the choosen size.
    DonManfred likes this.
  3. Croïd

    Croïd Active Member Licensed User

    This ?

    Dim Result As String
    Result = camEx.GetSupportedPicturesSizes.Length

    But result is :24 and not size !

    Attached Files:

    Last edited: Jul 13, 2015
  4. MaFu

    MaFu Well-Known Member Licensed User

    "camEx.GetSupportedPicturesSizes" returns an array. And if you write "camEx.GetSupportedPicturesSizes.Length" then your result is the array length.

    Create a variable in Globals:
    Dim pictureSizes() As CameraSize
    and use this code:
    pictureSizes = camEx.GetSupportedPicturesSizes
    For Each ps As CameraSize In pictureSizes
    " x "&ps.Height)
    and in the spinner event:
    Sub spinner1_ItemClick(Position As Int, Value As Object)
    Dim ps As CameraSize = pictureSizes(Position)
        camEx.SetPictureSize(ps.Width, ps.Height)
    End Sub
    DonManfred and Croïd like this.
  5. Croïd

    Croïd Active Member Licensed User

    Thanks MaFu,exactly what I need :)
  6. DonManfred

    DonManfred Expert Licensed User

    returns the LENGTH of the list of supported screensizes...
    Then you have 24 possible screensizes... You asks for the length and you got the length!
    Croïd likes this.
  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