Vector images?

Mark Waddingham mark at livecode.com
Wed Oct 21 09:38:35 EDT 2015


On 2015-10-21 15:18, Richmond wrote:
> On 21/10/15 12:48, Mark Waddingham wrote:
>> <snip>
>> 
>>> Well, vector images are very widely used, and they do have the
>>> advantage over bitmapped ones in that they don't go "all fuzzy"
>>> when they are resized: that, at the very least, is a big plus, and IF
>>> (??????) the Geometry Manager is 'whatever' vector images
>>> would sit very nicely with that.
>> 
>> The only reasonable answer I can come up with (beyond general 
>> intransigence of a behemoth) is that SVG is expensive (time wise) to 
>> render. Far more expensive than scaling and rendering a pre-computed 
>> image.
>> 
> Of course, you could think about using a different vector image format 
> . . .

All vector image formats are more expensive to render than a 
pre-rendered image. (The advantage of them, of course, is that they can 
be rendered at any size with no loss of quality). Note that this 
*rendering* I'm talking about not parsing the textual form into 
something which can then be iterated over and rendered.

> I know that SVG "is" the vector graphics standard, but that hasn't
> stopped any one adopting
> other formats that are, possibly, less complex.

There's two vectors of complexity here - complexity of processing the 
input format, and complexity of the underlying rendering engine required 
to render them.

Most vector graphics formats are largely equivalent in their 
requirements on a rendering engine (although SVG does have a fair bit of 
'filter' stuff which needs some reasonably heavy-lifting - that is if 
you want 100% support).

> At the risk of sounding totally cretinous (not that that would be for
> the first time), both Illustrator and Inkscape
> can export EPS files; and if they can do that on Macintosh, Windows
> and Linux . . .

EPS is actually just a very well structured version of PostScript - 
which (in theory) requires a full PostScript interpreter to render. That 
being said, from memory, Illustrator has always had a 'special form' of 
EPS where it uses only restricted sets of operators in a way which 
doesn't require interpretation (it's quite neat actually - the prologue 
contains the definitions for the operators so that such an EPS file can 
still be directly printed on a PostScript printer; whilst the file can 
also be understood by things which don't have a full PostScript 
interpreter).

So, anyway, there's no problem with SVG in general - I think it is the 
best thing to choose these days.

My comments were merely a small warning to say that - remember that 
rendering vector graphics on the fly is quite an expensive operation, so 
it might be that initial uses will require a bit of scripting to ensure 
things written using them work well at a reasonable speed. i.e. 
Precomputation where required. That being said, over time, I'm sure we 
can come up with numerous ways the engine can help here to ensure that, 
for the most common uses, the difference in rendering a vector image and 
a normal image is (after initial setup time) not very much at all.

Warmest Regards,

Mark.

-- 
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




More information about the use-livecode mailing list