Home / Topic / Image replacement from camera

Image replacement from camera

Home Kwiksher Forums Kwik User Questions Image replacement from camera

Viewing 3 posts - 1 through 3 (of 3 total)
  • victortarinteclas
    Participant
    #85034

    Hello everyone,

    In this tutorial ( https://kwiksher.com/tutorials_kwik/image-replacement-from-camera-intermediate/ ) you can replace some image from the camera.

    I created a photo button with external code to adjust the image size and position:

    local onComplete = function(event)
    local photo = event.target
    photo.x = 745;
    photo.y = 380;
    photo.xScale = 0.07;
    photo.yScale = 0.07;
    end
    if media.hasSource( media.Camera ) then
    media.show( media.Camera, onComplete )
    else
    native.showAlert( “Corona”, “This device does not have a camera.”, { “OK” } )
    end

    Is it posible to adjust different size for back and front camera?

    For example

    Front camera: photo.xScale = 1 photo.yScale = 1
    Back camera: photo.xScale = 0.5 photo.yScale = 0.5

    I will really appreciate your help!

    Many Thanks!

    Yamamoto
    Keymaster
    #85041

    it is possible to change size and to use front camera on iOS.
    the tutorial uses external codes, so you can change camera souce

    https://docs.coronalabs.com/api/library/display/setDefault.html

    the tutorial is for Kwik2 and need to be updated for current Kwik3 and Kwik4. I will update but I can not promise now when it will be.

    victortarinteclas
    Participant
    #85043

    Hello Yamamoto,

    Thank you very much for your help. Really appreciate it.

    With the external code from your tutorial I´m able to place the photo in the app, with the size I want. But I don´t know how to set or pop up only front-facing camera when press photo button.

    Sorry, just wanted to know if could be able to complete the code and if YES, do you know how?

    I am not working with codes so would really be grateful if you know.

    Many thanks in advance for your help.

    Victor

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.