# Filter not appearing on canvas when changing image by using DataURL

**URL:** <https://forum.ionicframework.com/t/filter-not-appearing-on-canvas-when-changing-image-by-using-dataurl/139687>\
**Category:** Ionic Framework\
**Created:** [August 25, 2018, 11:31am UTC](https://forum.ionicframework.com/t/filter-not-appearing-on-canvas-when-changing-image-by-using-dataurl/139687 "2018-08-25T11:31:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phyopwint](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@phyopwint](https://forum.ionicframework.com/u/phyopwint)\
**Post date:** [August 25, 2018, 11:31am UTC](https://forum.ionicframework.com/t/filter-not-appearing-on-canvas-when-changing-image-by-using-dataurl/139687/1 "2018-08-25T11:31:09Z")

</div>

I’m stuck with this 2 days already. Could someone help me get through it. Thank so much. Well, I’m working on ionic photo booth application. What I have to do is I get the image from iOS camera and apply filter on top of that image. I can get image on canvas but applying filter is failed somehow. I have no idea how to fix it.

```auto
this._CANVAS1 = document.getElementById("canvasEl1");   
this._CONTEXT1 = this._CANVAS1.getContext("2d");
var that = this;
var take_img = new Image();
take_img.onload = function() {
that._CONTEXT1.filter = 'brightness(1.2) saturate(100%) hue-rotate(330deg)';
that._CONTEXT1.drawImage(take_img, 15, 15, 820, 820);
arr = that._CANVAS1.toDataURL("image/png").split(',')[1];
that.ajax_uploadImage( arr , 1);
};
take_img.src = this.face1_img;

```

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:22pm UTC](https://forum.ionicframework.com/t/filter-not-appearing-on-canvas-when-changing-image-by-using-dataurl/139687/2 "2021-07-19T21:22:35Z")

</div>

Closed on July 19, 2021, 9:22pm UTC


