capture zooming image

You must Login before you can answer or comment on any questions.

i work a camera application. all functionality work properly but i could not capture zooming image with slider zooming functionality can u suggest some idea to me how to solve this problem

— asked 11 months ago by nitin tripathi
1 Comment
  • Yes. Just put the image in a scrollview. Like below. You can adjust the scale with the scrollview minZoom and maxZoom.

    var win = Ti.UI.createWindow({
        backgroundColor : '#000',
    });
     
    var scrollView = Ti.UI.createScrollView({
        backgroundColor: 'yellow',
        width: 320,
        height: 460,
        contentWidth:'auto',
        contentHeight:'auto',
       // showHorizontalScrollIndicator: true,
        //showVerticalScrollIndicator:true,
        minZoomScale:1,  
        maxZoomScale:10, 
        zoomScale:1,
        top:0
    });
     
     
     
    scrollView.addEventListener('scale', function (){
        Ti.API.debug(scrollView.zoomScale)
    });
     
     
    var image = Ti.UI.createView({
        backgroundColor: 'red',
        width: 320,
        height: 320,
    });
     
     
     
    scrollView.add(image);
     
    win.add(scrollView);
     
    win.open()

    — commented 11 months ago by Leonardo Amigoni

Your Answer

Think you can help? Login to answer this question!