Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Canvas & Ionic - how to solve an issue

$
0
0

@ralexlife wrote:

Hey guys,

I have an ionic app, similar to snapchat, where users can take a pic (using ionic native camera), add text, draw smth over, add icons / images etc.

This is implemented with a help of canvas. The width and height of canvas are set to this.platform.width() / height().

The workflow is the following:

  1. User takes a pic
  2. Pic is resized using canvas
  3. Pic is placed on new canvas as a background property

If I do not resize the pic and place it as a background, only part of the pic is shown on the screen.
If I resize a pic and make the size equal to canvas’ size, then the quality of the pic is really bad (blurred).

I do not know why I am not able to set any kind of background-size: cover properties to canvas to shrink the background pic, it simply doesn’t work.

Thanks in advance!

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>