Questions tagged [svgkit]

SVGKit is a Cocoa framework for rendering SVG files on iOS / OSX natively using CoreAnimation.

38 questions
4
votes
2 answers

How to parse SVG path component to UIBezierPath using SVGKit in iOS?

I am animating a SVG image in iOS using Swift. I have been able to render the SVG easily using SVGKit (https://github.com/SVGKit/SVGKit) but to animate it I need to convert the SVG path element to UIBezierPath. I can do so using other libraries but…
rushafi
  • 863
  • 10
  • 19
3
votes
2 answers

iOS : display svg from JSON

I'm trying to display a svg file in my iOS application. The svg file is given to me by a REST API. So I end up with an answer like this from the API : { "response": { "data": { “var2”: “svgCodeXML” }, "status": "ok" }…
lblyweert
  • 33
  • 3
3
votes
0 answers

How to display animated SVG file in iOS

Is there a way to display an animated SVG file in iOS. I am currently using SVGKit to display static SVG files, however I am interested in how to display animated SVGs such as the following file for…
cohen72
  • 2,830
  • 29
  • 44
2
votes
2 answers

Why can't I convert the `svg` data to UIImage using `SVGKit` in Swift 4?

I'm trying to convert my svg image data to UIImage instance using SVGKit, but when I'm trying to do this its getting crashed, and the error message is like below: Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason:…
Karthick Selvaraj
  • 2,387
  • 17
  • 28
2
votes
2 answers

How to convert jpg or png to svg in iOS?

I like to convert an .jpg or .png file to an .svg format that can be displayed in UIImageView. Is there a way to do this in Objective-C?
Mehul Valand
  • 31
  • 1
  • 4
2
votes
2 answers

SVGKit performance and should it be preferred over PNG?

I have been looking at SVGKit and I am finding conflicting ideas. Some say it's slower than PNG and others saying it is fast. I was hoping to get a recommendation and which route I should take. When I am exporting my vector graphics to PNG for…
Martin
  • 23,844
  • 55
  • 201
  • 327
2
votes
1 answer

SVGKit. NSString to SVGKImage?

SVGKImage has imageWithData: method which is not implemented. I also know that I can store NSString object as file and load it to a library via another method. But it would be too slow for me. Are there any other solutions?
user2083364
  • 744
  • 1
  • 7
  • 20
1
vote
1 answer

Macaw SVG Image

So I am trying to get an SVG image to show in SwiftUI however the documentation to the plugin Macaw is not written well - according to the GitHub. So how can I the following code to work? First I import this after pod install: import Macaw then I…
RussellHarrower
  • 6,470
  • 21
  • 102
  • 204
1
vote
1 answer

Change SVG colour using SvgKit in iOS Swift

I am using SVGKit library to render svg into image view. Svg is rendering perfectly but the issue is I am unable to fill the SVG colour. I found few examples in Objective C those are not helpful for me. Here I am using Swift5. Please find the…
1
vote
3 answers

Swift SVG Fill Color to SVGImage

I am using SVGKit to display Images https://github.com/SVGKit/SVGKit/ How do I apply fill color for the SVGImage let namSvgImgVar = SVGKImage(named: namSvgImg) namSvgImgVar.setFillColor() want to implement this setFillColor function
Sujay U N
  • 4,974
  • 11
  • 52
  • 88
1
vote
1 answer

How to save and retrieve svg image in swift.

I am new in SVG Image usage. I used svg image in iOS. I get CALayer using SVGKLayeredImageView. And change color of different part of SVG Image. Now I stuck at the point, How to save image locally with modified layers. This is my code. Please…
Anuj J
  • 186
  • 1
  • 11
1
vote
1 answer

Rendering of SVG with embedded Base64 encoded png images using SVGKit takes considerable memory

I am using SVGKit to render the SVG which has a lot of embedded Base64 encoded png images in it.The problem is that the rendering takes around a minute which is terribly slowing down my app and uses a large amount of memory.The total size of the SVG…
vishnu_146
  • 437
  • 3
  • 14
1
vote
0 answers

how to release memory when using SVGKit in iOS7

SVGKit is very powerful for displaying SVG image,while it cannot release the memory after loaded some SVG images,is there anyone encountered this problem and your advise will be appreciated . thanks very much!
1
vote
1 answer

Objective C and SVG

I am receiving a SVG back from our server that I need to display. What the server is returning is: preview = "
Padin215
  • 7,444
  • 13
  • 65
  • 103
0
votes
0 answers

How to create SVG file using SVGKit from part of content of NSView?

I tried with this code but it doesn't work. ` #import //... //create rect NSRect r = NSMakeRect(100, 200, 500, 300); SVGKImage* svgImage = [[SVGKImage alloc] init]; [svgImage setSize:r.size]; NSBitmapImageRep *imageRep =…
kkemic
  • 59
  • 3
1
2 3