title: Validation on image pixel
body: <p>Angular js Image upload how to check width and height example my withd=200 and heidht =200 if give more than pixel its show be error how can i us it if i try some thing can solve it </p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="form-group"&gt;
      &lt;label class="col-sm-2 control-label"&gt;Logo :&lt;/label&gt;
      &lt;div class="col-sm-4"&gt;
          &lt;input filestyle="" type="file" name="file" required="" ng-model="form.logo" onchange="angular.element(this).scope().add(this.files).checkPhoto(this)" accept="image/jpeg,image/jpg" data-classbutton="btn btn-default" data-classinput="form-control inline" class="form-control" /&gt;
          &lt;br&gt;&lt;label Style="color: Red;"&gt;Logo should be in (550 X 150) size&lt;/label&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>$scope.fileList1 = [];
  $scope.add1 = function(file1) {
      console.log(file1);
      for (var i = 0; i &lt; file1.length; i++) {
          if (file1[i].type == 'image/jpeg' || file1[i].type == 'image/jpg' || file1[i].type == 'image/tif' || file1[i].type == 'image/tiff') {
              var item = {
                  name: file1[i].name,
                  file: file1[i]
              };
              $scope.fileList1.push(item);
              var f = file1[i],
                  r = new FileReader();
              console.log($scope.fileList1);
              r.onloadend = function(e) {
              }
              r.readAsDataURL(f);
          } else {
              $('#file1').val('');
              Notify.alert('Upload only .jpeg,jpg,tiff,tif format file', {
                  status: 'warning',
                  pos: 'top-right',
                  timeout: 3000
              });
          }
      }
  };
  </code></pre>