Questions tagged [skia]
Skia is a complete C++ 2D graphics library for drawing text, geometries, and images.
0
votes
1answer
36 views
Skia error when trying to retrieve a bitmap downloaded from Google Sign-in
So, I am downloading the profile picture from the Google SIgn-in api and I save it to a hidden file. The problem is that when I try to retrieve it, it throws me: D/skia: --- Failed to create image ...
0
votes
0answers
13 views
Using skia to draw vs using android canvas
I am trying to make a app where i want to draw small detailed boxes that look like crossword and the user should be able to interact with them. So my question is are there any advantages to using Skia ...
1
vote
0answers
15 views
Error while building sample application viewer located under skia/platform_tools/android directory
Steps to reproduce the problem?
bin/gn gen out/arm64 --args='ndk="/home/anurag/Android/android-ndk-r19" ndk_api=27 target_os="android" target_cpu="arm64" is_component_build=true is_debug=false'
ninja ...
-1
votes
0answers
19 views
Access Flutter widget draw calls from dart
Is it possible to access / inspect the dart-ui Canvas draw calls being called for a widget each frame?
Given a widget, according to the rendering pipeline, it is converted to dart-ui canvas draw ...
0
votes
0answers
61 views
Rendering multi character emoji in SkiaSharp
I am rendering emoji in SkiaSharp and have been able to get it to work correctly for simple emoji (like 👶 or 😂) but not more complex emoji (like 👶🏻 or 👩🏼🎨).
The trickiest part was setting the ...
0
votes
0answers
58 views
D/skia: png error IDAT: CRC error codec->getAndroidPixels() failed
I am trying to make simple video stream app. An image is captured on the server and saved as png, that is converted to bytes and sent over the internet (or local net) to the android app, which saves ...
2
votes
1answer
57 views
What is the optimal render loop in Dart 2?
I am looking for ideas regarding an optimal/minimal structure for the inner render loop in Dart 2, for a 2d game (if that part matters).
Clarification / Explanation: Every framework / language has ...
0
votes
1answer
124 views
Flutter mask a circle into a container
I want to add a circle effect over a container, but I want the circle to not extend the dimensions of the container, but instead get clipped by it. This is what I'm trying to achieve:
As you can see ...
0
votes
1answer
116 views
ImageView RecyclerView Lazy Load
I have a RecyclerViewAdapter which in onBindViewHolder, I make an AsyncTask call to download the image required from Google Cloud Storage.
There are some items in the RecyclerViewAdapter which call ...
0
votes
0answers
77 views
Use metal as backend in skia
I want to try the metal with skia, but the surface always return null, and can't find any sample code around..
Here is the code:
_device = MTLCreateSystemDefaultDevice();
MTLTextureDescriptor* ...
0
votes
0answers
53 views
Intergrating QML and Skia (gpu backend)
I am trying to use skia with qml. I am inheriting from QQuickPaintedItem. I have modified this exanple, http://doc.qt.io/qt-5/qtquick-customitems-painteditem-example.html to use QQuickPaintedItem::...
1
vote
1answer
107 views
Use Skia in Clion on OSX
I want to use Skia and SDL2 in Clion on OSX. I installed SDL2 successfully and test it in a single project in Clion, it worked well. And then I followed the tutorial on Skia's official site. I ...
0
votes
1answer
113 views
Skia C++ VS2015 project setup
I'm trying to create a simple windows application using Skia and C++ on visual Studio 2015. I believe I have created static, shared and release versions of skia.lib, and have linked to the proper ...
0
votes
0answers
49 views
dlopen failed: cannot locate symbol “_ZN11SkJpegCodec6IsJpegEPKvj” referenced by libmyskia.so
I am trying to build skia for android using the master branch. But I got the following error:
java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN11SkJpegCodec6IsJpegEPKvj" ...
3
votes
2answers
184 views
Fody Costura Does Not Embed SkiaSharp DLL
I created a solution that uses the Costura.Fody nuget package to merge referenced assemblies as embedded resources. I want this so that I can create a single exe for my application. This was working ...
0
votes
0answers
55 views
Change color type of bitmap in SkiaSharp?
I have a bunch of gifs I want to create thumbnails for using SkiaSharp. But SKBitmap.Resize method returns null when having a source bitmap with color type other than 32-bit (as it seems). But how do ...
1
vote
1answer
98 views
Translate matrix to center and fit a rectangle
I use SkiaSharp to draw some SKRect on a SKCanvas. I'm trying to implement a "scale to fit and center" functionality for the drawing area. I used the following code to calculate the bounding box for ...
2
votes
1answer
48 views
How to measure trailing spaces using SkiaSharp?
SkiaSharp doesn't consider the white spaces, when a text contains white spaces in prefix or suffix. It returns the text width only and ignore the white spaces. I am using the following code snippet to ...
0
votes
0answers
90 views
How to draw a path partially with SkiaSharp? (Xamarin Forms)
The result i'm trying to achieve is to animate a path in a way that it looks like its traced over time. So i call InvalidateSurface() on my SKSurface every 1/60 seconds. What I need to do in the ...
0
votes
0answers
19 views
Dimension of objects drawn on canvas
Is it possible to know the dimension of an object drawn to a canvas?
As example, if I draw a text
canvas.DrawText(ObjectText, new SkiaSharp.SKPoint(ObjectX, ObjectY), BlackTextPaint);
how can I ...
2
votes
0answers
38 views
Skia - crop SKSurface to content
I'm new to Skia.
I need to crop the dimension of an SKSurface to its non white/transparent content.
Do I have to iterate all the pixels? Are there better and/or faster alternatives?
Thanks in ...
0
votes
1answer
59 views
unable to put stamp using itext7 using Java lanaguage on only skia generated pdf (shows inverted stamp)
I am unable to put stamp using itext7 using Java language on only skia generated pdf (skia is pdf library used by google; if someone has worked on google docs-> Clicks on Print -> Save as Pdf ). It ...
1
vote
0answers
74 views
SkiaSharp support for color quantization for PNG files
I'm looking for an all-in-one solution for processing web images
Resizing
Cropping
Save as WEBP / JPEG / PNG
Drawing simple rectangles
Adding text
Reducing colors (quantization) for PNG
The only ...
4
votes
1answer
170 views
Canvas.drawText() doesn't render large emojis on Android
Canvas.drawText() doesn't render emojis above a certain font size on Android.
Correct render at somewhere below 256 px:
Incorrect render at above 256 px:
(There is a similar question about Google ...
0
votes
0answers
100 views
Arabic text rendering with Skia (SkiaSharp)
I'm rendering text with SkiaSharp for various platforms. I have problem with arabic script. I've created simple shaping routine and I have nicely connected glyphs. But diacritics is off completely.
...
0
votes
1answer
477 views
how to compile skia on windows
I tried compiling skia on windows as suggested in https://skia.org/user/build
1> bin/gn gen out/Static --args='is_official_build=true'
2> ninja -C out/Static
build fails to find libjpeg.h, libpng.h
...
1
vote
0answers
48 views
Android native crash when decoding png images on some 6.0 devices
Happens only in 6.0 devices, the stack trace is as follows.
I'm scaling images down by setting BitmapFactory.Options.inSampleSize, so my code is scaling png files. What that be an issue?
backtrace:
...
0
votes
0answers
76 views
Can skia work with kNativeGL_BackendType on an embedded arm linux target?
I'm going to port my desktop app to an arm board with embedded linux system.
Can skia work with kNativeGL_BackendType on an embedded arm linux target ?
Does it mean OpenGLES instead of OpenGL ?
...
1
vote
0answers
155 views
How to link skia to my own project?
I have built skia with skia build.
Now, I have the out/{Static/Shared/Release/...}, but how to link it with my personal project folder?
Is it necessary to move the skia folder to my project folder (...
3
votes
0answers
57 views
Structure of SKPictureRecorder
I am trying to use SKPictureRecorder of SkiaSharp to draw a path in the SKCanvas. The image is not saved in the disk. Please find the code below for your reference.
SKPictureRecorder record = new ...
0
votes
0answers
74 views
crashs on android L when load so
I have a skia shared library generated from skia source code, i want use it to draw something in my cpp file. This project runs well on android M and N, but it crashed on android L.
This is my ...
0
votes
0answers
104 views
Using Skia support of PDFium with SkiaSharp
I am using skia support of PDFium in which I'm getting a pointer(IntPtr) from the FPDF_RenderPageSkp method which is a SkPictureRecorder. How can we use SkiaSharp package to obtain the ...
0
votes
0answers
20 views
How to add debug log in /platform/external/skia/ in Android?
I want to debug the skia library, but just cannot add debug log(such as ALOGD),
How to add debug log so that I can check this debug log in the logcat.
1
vote
0answers
42 views
How to find the equivalent pixel format in skiasharp?
In system.drawing there is a pixelformat in which we have added the pixel format while creating the BITMAP.Kindly refer the below code.
Bitmap image = new Bitmap((int)width, (int)height, ...
2
votes
1answer
183 views
How to make the SKBitmap bitmap color as Transparent in SkiaSharp
In System.Drawing we will make the bitmap image color as transparent by using maketransparent method Whether SKBITMAP has any other equivalent method for making the color to transparent.
Bitmap ...
1
vote
0answers
130 views
Perspective Transform in Skia
I have a quadrilateral, the coordinates of which are known. I need to do a perspective transform and warp an image to those coordinates using Skia. I have referred to the links in Skia's page like ...
2
votes
1answer
196 views
How to find PixelFormat for decoded bitmap using SkiaSharp
In System.Drawing we retrieve the PixelFormat from Image object, but SkiaSharp.SkImage does not provide API to find the PixelFormat of decoded image. Whether it has any other workaround to find the ...
0
votes
1answer
89 views
How to avoid “adding up” of opacities in SkiaSharp
I'm currently creating a Xamarin.Forms app. One of my pages uses SkiaSharp to allow users to highlight parts of an image in a text marker style (i.e. a yellow brush with low opacity).
This is how the ...
3
votes
1answer
231 views
Why does SkiaSharp.SKBitmap.Resize returns null?
The documentation says:
returns the resized bitmap if the resize operation could be
performed, otherwise null.
That clearly doesn't help. At all.
It could at least give us a enum / error code / ...
1
vote
1answer
128 views
Skia buggy color blending
I'm using Skia m62 with Open GL backend and getting the glitch while rendering png file.
To create SkBitmap I'm using the following code:
const auto codec = SkCodec::MakeFromStream(SkStream::...
0
votes
0answers
34 views
offscreen buffer blending from saveLayer( ) in skia
having a doubt about saveLayer()
from the doc, saveLayer(nullptr, nullptr) would allocate an off-screen buffer and later it's composited back to original buffer when restore() is called.
How is that ...
0
votes
1answer
136 views
Convert System.Drawing.Pen to SkiaSharp Type
i have an old asp.net project which uses heavily system.drawing types. But for performance reasons (process wide locking etc.) i will switch to skia/skiasharp. As a first migration step i am looking ...
2
votes
1answer
408 views
Flip an SKPath using SkiaSharp
I'm using slightly modified resize code based on example I found. However, on resize the everything is flipped. I would like to either flip it back or prevent it from flipping in the first place.
...
0
votes
1answer
685 views
How to render SKBitmap in Windows.Forms application?
Hi I started a new project and WinForms is new for me. I have a SKBitmap object and I don't know how can I render it.
3
votes
0answers
225 views
SkiaSharp SVG click element get id
let say i have svg document like this:
"<svg height='300' width='300'><rect class='rect us' id='12212' x='34' y='54' width='20' height='20'/><rect class='rect us' id='12213' x='64' y='...
5
votes
1answer
4k views
Skia vs Cairo vs Direct2D, which is the most feature rich?
A just curious question.
I'm aware that:
Skia, Cairo: library
Direct2D: API
But without any additional components, exclusively on Windows platform, which bears the most features? I'm not talking ...
8
votes
1answer
163 views
Non-uniform text scaling in Skia (FreeType 2 back-end)
My issue is that during smooth scaling applied to Skia canvas (with concat method) the text appears to scale in "spurts", non-uniformly. The issue is particularly evident on Android platform with ...
2
votes
2answers
275 views
How can I get rid of artifacts in ImageSource created with SkiaSharp
I created an app in which I want to display text on top of google maps. I chose to use custom markers, but they can only be images, so I decided to create an image from my text utilizing SkiaSharp.
...
2
votes
2answers
316 views
SkiaSharp ArcTo Method does not draw curve
I am trying to draw an arc on a SkiaSharp canvas view using following code.
path3.ArcTo(new SKPoint(0, h/2), 1.57f, SKPathArcSize.Large,
SKPathDirection.Clockwise, new SKPoint(w/2, h));
...
1
vote
2answers
631 views
SkiaSharp does not fill triangle with StrokeAndFill
I am trying to draw and fill a triangle. I referred an android - question How to draw filled triangle on android Canvas and did the following. It draws the triangle but it doesn’t fill it. How to get ...