Skip to content

Commit 0ea681c

Browse files
committed
824314: Image Editor New UG Sample
1 parent e8f0057 commit 0ea681c

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

blazor/image-editor/open-save.md

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -363,38 +363,6 @@ To save an image as a blob, use the [`GetImageDataUrlAsync`](https://help.syncfu
363363
}
364364
```
365365

366-
### Add Watermarks while saving the image
367-
368-
User can utilize the ‘[`BeforeSave`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SaveEventArgs.html)’ event, which triggers just before the image is downloaded, to apply a text annotation as a watermark. After the image is downloaded, the ‘[`SaveEventArgs`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SaveEventArgs.html)’ event is triggered, allowing you to remove the watermark using the ‘[`DeleteShapeAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_DeleteShapeAsync_System_String_)’ method. This ensures that the watermark is only visible in the downloaded image and not in the editor.
369-
370-
```cshtml
371-
@using Syncfusion.Blazor.ImageEditor
372-
<SfImageEditor @ref="ImageEditor" Height="400">
373-
<ImageEditorEvents Created="OpenAsync" Saving="BeforeSaveAsync" Saved="SavedAsync"></ImageEditorEvents>
374-
</SfImageEditor>
375-
376-
@code {
377-
SfImageEditor ImageEditor;
378-
379-
private async void OpenAsync()
380-
{
381-
await ImageEditor.OpenAsync("nature.png");
382-
}
383-
384-
private async void BeforeSaveAsync()
385-
{
386-
ImageDimension Dimension = await ImageEditor.GetImageDimensionAsync();
387-
await ImageEditor.DrawTextAsync(Dimension.X.Value + 100, Dimension.Y.Value + 100, "Enter\nText", "Arial", 40, false, false, "#80330075");
388-
}
389-
390-
private async void SavedAsync()
391-
{
392-
var Shapes = await ImageEditor.GetShapeSettingsAsync();
393-
await ImageEditor.DeleteShapeAsync(Shapes[Shapes.length - 1].id);
394-
}
395-
}
396-
```
397-
398366
### Save as image in server
399367

400368
The [`GetImageDataUrlAsync`](https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.ImageEditor.SfImageEditor.html#Syncfusion_Blazor_ImageEditor_SfImageEditor_GetImageDataUrlAsync) method in the Blazor Image Editor component is used to gets the current image data url from the Image Editor component

0 commit comments

Comments
 (0)