From 61ad7ab13c1bafc77d78687e1d053afb5b2aa790 Mon Sep 17 00:00:00 2001 From: nikita Date: Wed, 12 Apr 2017 13:26:11 +0530 Subject: [PATCH] resolved issues --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index edab59e..f53e6c9 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -4757,11 +4757,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo } } else { - imageData[i] = ((255) * (parseInt(transNumber))) / 100; + + imageData[i] = ((255) * (parseInt(transNumber))) / 100; } - } - + + } + tempCtx.putImageData(imageD, 0, 0); @@ -4788,6 +4790,29 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo // var ctx = transparencyCanvas.getContext('2d'); ctx.drawImage(tmpCanvasContext, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage) + + if ($rootScope.isModestyOn == true && (bodyRegionId.match('modestyImg'))) { + + var imageD1 = ctx.getImageData(0, 0, Width, Height); + var imageData1 = imageD1.data; + var length1 = imageData1.length; + + + // set every fourth value to the desired number of transparency + for (var i = 0; i < imageData1.length; i += 4) { + if (imageData1[i] == imageData1[i + 1] && imageData1[i + 1] == imageData1[i + 2] && imageData1[i + 2] === 0) { + imageData1[i + 3] = 0; + } + + } + + + ctx.putImageData(imageD1, 0, 0); + + } + + + // $scope.transparencyDrawnRegions.push(bodyRegionId); $scope.transparencyDrawnRegions.push({ 'BRID': bodyRegionId }); -- libgit2 0.21.4