All Questions
153 questions
0
votes
0
answers
263
views
How to Convert Xamarin ImageSource to a Format for Pixel Manipulation (e.g., SkiaSharp or GDI)?
I'm working on a Xamarin.Forms project where I need to perform pixel-level manipulation on images loaded through Xamarin's ImageSource. I'm looking for a way to convert the ImageSource to a format ...
0
votes
1
answer
69
views
SKBitmap manipulation issue in Xamarin.Forms with SkiaSharp
I'm working on a Xamarin.Forms project and utilizing SkiaSharp for bitmap manipulation. I have a code snippet that directly manipulates an SKBitmap obtained from an ImageButton source, and it works as ...
0
votes
0
answers
67
views
Translating WinForms Drawing Code to Xamarin.Forms Without SKPaintSurfaceEventArgs
I came across the following WinForms drawing code that I need to adapt for use in a Xamarin.Forms project. However, the code is originally written within the SKPaintSurfaceEventArgs event handler in a ...
0
votes
0
answers
484
views
SKiasharp Setting Typeface with ttf file resulting in null
I am trying to load a ttf file into a Typeface in skiasharp
I followed instructions here: Loading a font in skiasharp
The stream is successful but when I assign the typeface...its null. I have no ...
1
vote
1
answer
174
views
Xamarin Forms FFImageLoading SVG Is blending possible without SkiaSharp?
Is it possible to blend SVG images that use FFImageLoadingSVG.
I need to blend a SVG image that I loaded to make up a whole image but I cannot use Opacity as it doesn't do what I need it to do. ...
0
votes
0
answers
157
views
Is there a way to set the (0,0) point in the center of the Canvas in SkiaSharp?
I'm using SkiaSharp in Xamarin.Forms (after an unsuccessful attempt with Path shapes) and I have created a Cartesian coordinate system drawn on the Canvas.
Is it possible to move the (0, 0) point in ...
0
votes
1
answer
794
views
Example of how to create an image with clickable regions
This is not a question, but an article on how to do this.
All the details and focus will be in the answer to this question.
What is it about:
I was looking for a way to achieve is this
This is what I ...
0
votes
0
answers
524
views
SkiaSharp DrawPath, how to know what path the user has clicked
I need to have in my android app an image where the user can click on a part of the image, and than that part will color different.
I searched a lot on this, but found no use-able solution, all I ...
1
vote
0
answers
194
views
System.InvalidOperationException: 'You must call Xamarin.Forms.Forms.Init(); prior to using this property.'
I created a new UWP app, something I've never done before, and copy and pasted a bunch of code from another Xamarin Forms project, code that did work there. Now I run into the error:
System....
0
votes
1
answer
340
views
Skia Sharp DrawText not considering Android accessibility settings (Font Size)
If user changes the Font Size from default to large or largest in androids accessibility settings all labels are scaled up. But drawing text with DrawText method on a canvas has no effect.
Is this the ...
0
votes
0
answers
183
views
Xamarin Microcharts: Is it possible to show tooltip on microchart
Is it possible to display a tooltip on click on the bars in Microchart? This feature is available in syncfusion.
I am trying to see if the bars can accept touch events and display a popup on click. I ...
0
votes
0
answers
242
views
Adding Xamarin GestureRecognizers on SKCanvasView
I have added Xamarin GestureRecognizers on a SKCanvasView and overridden OnTouch method.
I have some implementations on SKTouchAction.Moved. In order to trigger it after SKTouchAction.Pressed on ...
1
vote
1
answer
176
views
Is there any way to implement long press gesture with SkiaSharp?
I am using Skiasharp on Xamarin Forms app. With SKTouchAction I was trying to capture the time duration of SKTouchAction.Pressed and SKTouchAction.Released and find if the gesture is Long pressed or ...
0
votes
0
answers
535
views
Skiasharp how to get coordinates from touch location after scaling and transform
I have an Xamarin project where I am using Skiasharp. I am relatively new to the drawing utility. Ive spent a few days trying to figure out this issue with no luck. After scaling and transforming ...
0
votes
1
answer
227
views
How to reuse SkiaSharp SKBitmap?
I am receiving JPG image as byte array from socket. Then I use SKBitmap.Decode(byte[]);. The problem I am facing is memory leak. I assume that decoding makes new instance and copies bytes. Is there a ...
1
vote
0
answers
118
views
Xamarin Forms Mobile App - Is it possible to track position of pen stylus?
I am writing an Android drawing mobile app using Xamarin Forms and SkiaSharp. The mobile tablet that I am using has a pen stylus (Samsung Galaxy Tab). When I hover the stylus over the screen, the ...
0
votes
1
answer
440
views
When using SkiaSharp SKColorFilter.CreateBlendMode is it possible to create a dashed line?
I'm using CreateBlendMode to change the color of an SVG drawing as follows:
public Color TintColor;
TintColor = Colors.LawnGreen;
using (var paint = new SKPaint())
{
paint.ColorFilter = ...
1
vote
1
answer
1k
views
SkiaSharp SKSvg.Load throws MissingMethodException
I use SkiaSharp libraries on my Xamarin.Core/Xamarin.iOS project.
I try to load an SVG file from the Core library like the following;
var svg = new SKSvg();
Assembly assembly = type.GetTypeInfo()....
0
votes
1
answer
284
views
Android BlurView issues with SKCanvasView
I am attempting to create a view for Android whose background appears to blur the view's content for which it is on top. This is nothing new and has been done before. I based my implementation on what ...
0
votes
0
answers
769
views
SkiaSharp's PaintSurface not called
Before to start the question, I would like to inform that I am completely newbie to Xamarin...
I would like to understand what I need implement/add/edit in my solution in my project in order to get
...
1
vote
1
answer
80
views
Xamarin Forms buttons stop receiving mouse clicks after clicking on SkiaSharp CanvasView on iOS
I use SkiaSharp canvas to draw the main game screen, and then there are various Xamarin.Forms Buttons around the UI. This all works fine on when used directly on iPhone or iPad using a finger. However,...
1
vote
1
answer
1k
views
SkiaSharp displays svg file in black color in xamarin forms
I am using nuget packages
SkiaSharp.Svg
SkiaSharp.Views.Forms
SkiaSharp.Extended
The problem is some SVG files display fine, but others show me all black and I have no idea why that is, If you could ...
1
vote
1
answer
623
views
I want to add text on top of a bitmap in Xamarin Forms Skia
I would like to be able to create an infographic style image in my Xamarin Forms app. I have a png that I am planning to use as the background and then add text on top of it.
I was trying to use ...
0
votes
1
answer
482
views
Xamarin Forms Bitmap Coordinates on SkiaSharp Canvas
I have a simple Xamarin Forms page that contains a SkiaSharp Canvas. I am allowing the user to load a floor plan bitmap to use as the background for the Canvas, and they can add smaller bitmaps to be ...
0
votes
1
answer
288
views
How can I build slanted dashed line in Xamarin application
I want to display a slanted dashed line in my application that would look something like
this. using Line API in xamarin I was able to create dashed line, but I haven't had any luck with making each ...
5
votes
1
answer
326
views
Animate needle transition
When I read data from GPS sensor, it comes with a slight delay. You are not getting values like 0,1 0,2 0,3 0,4 0,5 etc, but they are coming like 1 then suddenly 5 or 9 or 12. In this case needle is ...
1
vote
0
answers
140
views
Smooth velocity scroll
I'm trying to implement a smooth slow down scroll based on the velocity of the user gesture.
I'm using MR.Gestures to handle the pan gesture and obtain the velocity, then I'm running an animation loop ...
0
votes
1
answer
774
views
How can I convert UIContentSizeCategory to a numerical font scale value?
Summary
I have text that I draw on a SkiaSharp canvas which does not automatically adjust to the Larger Accessibilty Sizes setting in iOS. I would like to scale the font when I draw it according to ...
0
votes
1
answer
514
views
Xamarin SKEncodedImageFormat Jpeg background added
I'm coding in Xamarin with SkiaSharp libraries for UWP (eventuallay Android but not ios) with VS 2019
With this code
SKBitmap signature = SKBitmap.Decode(canvasImg.Encode());
using (var image = ...
0
votes
1
answer
596
views
How to bind an object to an event so that when touch the event is called in SkiaSharp?
I draw a pie chart using SkiaSharp, I want some information to be displayed when I clicked on the pieces of these charts
There is such a thing, for example, when you click on the black color, some ...
0
votes
1
answer
821
views
C# / Xamarin: Saving image and Sharing on Whatsapp
I'm trying to save a image from Bitmap and share it in whatsapp, but, when I save it in my phone and try to open it, the image goes all black, so, when I share it, I share a black image. In other ...
0
votes
2
answers
334
views
Xamarin.Forms "Application.Current" under iOS is not my Application class
I'm writing a Xamarin.Forms application using Xamarin.Forms 5.0.0.2012.
I'm trying to exit the current content page using the following code:
async void _quitButton_Clicked(object sender, ...
2
votes
1
answer
264
views
SKCanvasView event args contains only Pressed action type
My Sample custom control inherits from the SKCanvaView and overrides the OnTouch method. It simple prints into the Debug stream action type, however, the action type is always the type of Pressed.
...
0
votes
0
answers
690
views
Xamarin SkiaSharp Scaling a crop canvas
I try to get a polygonal cropping from a photo i capture from my app in Xamarin Foms.
I use SkiaSharp .So the first step is ok i get a canvas from my EdgeCroppingView like this
So now I want crop the ...
2
votes
1
answer
709
views
AspectFill doesnt work on resized image in SkiaSharp in xamarin, What can I do?
I have tried AspectFill on Emulator and it works, theres just pictures from Camera simulator and they are lowres so they havent been resized. But when I ve tried that in mobile where I have highres ...
1
vote
2
answers
622
views
How to load Image using Skiasharp in Tizen watch using C#
I'm using C# Xamarin, and SkiaSharp to render image from resource folder. But I cannot get the correct image location.
Where I can find this image when run project? I try to looking for but no result:...
0
votes
3
answers
533
views
SkiaSharp SKMatrix.PostConcat Obsolete?
I am using the Docs to implement some Skia Sharp in a Xamarin project to move some images around on the screen and it works well following these docs:
https://learn.microsoft.com/en-us/xamarin/xamarin-...
0
votes
0
answers
651
views
How can I make a snapshot of the surface using SKSurface.Snapshot()?
The following code breaks the code, and my App closes when I click the Button.
I tried to take a snapshot inside the method, but it crashes the App.
SKSurface CenterSurface;
void ...
1
vote
2
answers
1k
views
Is there a simple way of handling (transforming) a group of objects in SkiaSharp?
In a nutshell, let's say, I need to draw a complex object (arrow) which consists of certain amount of objects, like five (or more) lines, for instance. And what's more important, that object must be ...
0
votes
0
answers
83
views
Unanticipated visual elements present in the raster image generated via its SVG counterpart
An unanticipated amount of dregs is present in the background of the PNG images (as seen in the following images) generated from their SVG counterpart (attached to the app as an embedded resource) ...
1
vote
0
answers
1k
views
How can I decode a h.264 / MP4 byte array into a bitmap
In Xamarin.Forms, I send a TCP request to a server and get an MJPEG byte stream back. I put each frame data into a byte[] array. I then use SkiaSharp.SkBitmap.Decode(byte[] buffer) to return a bitmap, ...
2
votes
0
answers
2k
views
Save SkiaSharp Canvas with Bitmap Image with finger painting
I am trying to paint on bitmap image and then updated drawing needs to be saved
till now I was able to get the image on canvas and also I am able to draw on bitmap image but the problem is when I ...
0
votes
0
answers
183
views
System.NotSupportedException: 'Undable to activate instance of type SkiaSharp.Views.Forms.SKCanvasViewRenderer from native handle'
I am trying to replace ContentView.Content by touch.
However, if I touch ContentView, I got a strange exception like below.
System.NotSupportedException: 'Undable to activate instance of type ...
10
votes
3
answers
20k
views
Using SkiaSharp.SKBitmap image as the ImageSource for a Button in Xamarin
I am attempting to use/convert the SKBitmap image as/to an ImageSource object in order to use the aforementioned image in a Button by assignment to its ImageSource property but, for the life of me, ...
1
vote
2
answers
1k
views
How to debug a Xamarin Forms app that disappears on Android without any exception being thrown?
EDIT: I found the error in logcat. See the confirmed answer below
I'm new to Xamarin but have done a fair amount of straight Android development. I have a situation where my Xamarin app is ...
2
votes
1
answer
797
views
How to freehand erase on a SKCanvasView?
I am trying to make a drawing app in Xamarin.Forms. I am able to draw paths. My problem is, how can I remove part of a path, when user try to erase on the drawing. I have tried the following:
if (...
1
vote
0
answers
1k
views
How to Replicate this Postman Request which has a Binary Content Body and contains a .PNG File in C#?
Here is the postman request I want to replicate in C# for my Xamarin App:
Here is how I am getting the image from my SKCanvasView:
var surface = SKSurface.Create(new SKImageInfo((int)...
0
votes
1
answer
1k
views
How do you clear an SKCanvasView
I was looking at https://forums.xamarin.com/discussion/129113/clear-the-drawings-in-skcanvas-skiasharp-in-xamarin-forms but I do not understand their solutions for how to clear the canvas. Can you ...
0
votes
0
answers
2k
views
How to convert SKImage or SKData to String in Xamarin to be able to create a post request
Here I have my code (from https://forums.xamarin.com/discussion/102674/how-to-save-finger-painting-from-skcanvasview-into-file)
void OnAnalyze(object sender, EventArgs e)
{
var ...
0
votes
2
answers
854
views
My Xamarin Code for on screen Drawing is not able to be Drawn on even though I followed tutorial code
Hi guys I used the code in in this tutorial (https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/graphics/skiasharp/paths/finger-paint) and modification with this forum post (https:/...