Some demo on drawing on a given image.
Closed this issue · 2 comments
Fridthjof commented
Would be nice.
The string given in imageUrl, should that be a encode base64 or simply just a path to the image? etc etc.
Peshou commented
Hi, it can be both a base64 image or a path to an actuall image, the principle is the same, the only difference is that with the base 64 image we need to say the image type as well: data:image/png;base64,
Example for a base 64 image:
With the the @Input()
<canvas-whiteboard
[imageUrl]="'data:image/png;base64,BASE64_TEXT_HERE'">
</canvas-whiteboard>
Or via the options object
HTML:
<canvas-whiteboard [options]="options"></canvas-whiteboard>
TS:
@Component({})
export class RandomComponent {
options: CanvasWhiteboardOptions = {
imageUrl: 'data:image/png;base64,BASE64_TEXT_HERE'
}
}
Peshou commented
Closing for inactivity, please reopen if needed