0

I'm helping create an app that will use images that can be resized (think AutoCAD). Fortunately, I have PaintCode and I have Illustrator so it's very easy for me to convert a svg file into code should I want to.

I converted one image into code and it's around 10,000 lines of code for the image. For speed purposes, is it better to have just a frame with a uiimage inside of it or to use the 10,000 lines of code filled with bezier paths?

jasonnoahchoi
  • 871
  • 5
  • 16

1 Answers1

0

I agree with Sami that benchmarking is the best way to answer the question.

In general bitmaps tend to be faster but take more storage space. Vector graphics tend to be smaller, and resolution-independent, but get slower and slower as complexity goes up. (Where bitmap performance is all but independent of image complexity. I say "all but" because some compression formats like JPEG do more work on complex images.)

Duncan C
  • 128,072
  • 22
  • 173
  • 272
  • Thanks for the answer. Yeah I read up on it a bit and it seems this is definitely the case. Benchmarks were roughly the same initially with just a few images placed onto the VC. We've decided to go with the code for more flexibility in the future. – jasonnoahchoi Jun 05 '15 at 19:33
  • You should compare a worst-case example (an image generated from 10,000 lines of code). In that case you'll likely find the bezier path much slower. – Duncan C Jun 05 '15 at 20:17