Ninad Dafale
unread,Jun 1, 2023, 8:49:25 AM6/1/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to skia-discuss
I have built Skia statically. My code runs perfectly when I try to take a snapshot of images in formats such as JPG, PNG, GIF, BMP, and WebP.
However, I'm encountering an issue when attempting to create a snapshot of SVG image files (or any other image format).
When I try to create a SkImage object using the following line of code, it results in a segmentation fault:
sk_sp<SkImage> image = SkImages::DeferredFromEncodedData(data);
where data is encode data from -> data = SkData::MakeFromFileName(image_path);
According to Skia documentation, not all image formats are supported natively.
I would like to find a solution that allows me to use the DeferredFromEncodedData method to obtain an SkImage object for SVG images or any other image format.
I have already tried configuring Skia with the "skia_enable_svg=true" argument, but unfortunately, that did not resolve the issue.
My goal is to take a snapshot of an image regardless of its format, Can anyone provide guidance on the correct configuration to achieve this?
thank you..!!