Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-25527

ANDROID - Camera picture blob ImageView toImage

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Android
    • Labels:
      None
    • Environment:

      Description

      The Sample Code is here: https://www.dropbox.com/s/j0duneeypnzk3z8/AndroidPictureToImageBug.zip?dl=0

      In Android, using Titanium 6.3.0, I cannot toImage an ImageView with an image blob set. I was able to do this in versions prior to 6.3.0. I have attached the sample code.

      The end result of the code should be a watermarked camera image. When the toImage() result of the below function is set to the image attribute of an ImageView on the index.xml, the appear appears white or gray with a distorted Label.

      function getViewWithLogoOverlay_Android(imgCompressedBlob)
      {
      //create image with EZSmiles logo
      var imgView = Ti.UI.createImageView();
      imgView.width = Ti.UI.FILL;
      imgView.height = Ti.UI.FILL;
      imgView.image = imgCompressedBlob;
      imgView.defaultImage = imgCompressedBlob;
      imgView.backgroundColor = 'transparent';

      imgView.addEventListener("load", function()

      { console.log("helllooooo HELLLOOOOO"); }

      );

      var imgLogo1 = Ti.UI.createLabel();
      imgLogo1.color = "#e2e2e2";
      imgLogo1.opacity = .5;
      imgLogo1.text = "Powered By";
      imgLogo1.font =

      { fontFamily: 'Nunito-Regular', fontSize: 12 }

      ;

      var imgLogo = Ti.UI.createLabel();
      imgLogo.color = "#e2e2e2";
      imgLogo.opacity = .5;
      imgLogo.text = "EZSmiles";
      imgLogo.font =

      { fontFamily: 'Nunito-Regular', fontSize: 24 }

      ;

      var imgViewColl = Ti.UI.createView();
      imgViewColl.width = Ti.UI.SIZE;
      imgViewColl.height = Ti.UI.SIZE;
      imgViewColl.layout = "vertical";
      imgViewColl.left = "10%";
      imgViewColl.top = "75%";
      imgViewColl.add(imgLogo1);
      imgViewColl.add(imgLogo);

      var templateView = Ti.UI.createView();
      templateView.width = "100%";
      templateView.height = "100%";

      templateView.add(imgView);
      templateView.add(imgViewColl);

      return templateView.toImage();
      }

        Attachments

          Activity

            People

            • Assignee:
              ybanev Yordan Banev
              Reporter:
              jjoseph Johnson Joseph
            • Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

                • It looks like Backbone Issue Sync is not enabled for your project.

                  Git Source Code