These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:11 pm Advanced search

Canvas xml to create emf, eps, etc

Here you can discuss things related to HTML and the Web in general that do not fit in to other categories.

Canvas xml to create emf, eps, etc

Postby akujbida » Sun Jun 28, 2009 8:56 am

It seems to me that since the canvas content is written vector style that it should be a simple matter to generate an emf or eps from canvas xml. Yet nobody has done this, despite the tremendous usefulness eg in printing high quality, copying canvas images to word processor documents, etc.

Is it really not feasible?
akujbida
<h6>
 
Posts: 2
Joined: Sun Jun 28, 2009 8:42 am

Postby zcorpan » Thu Sep 17, 2009 8:08 am

I don't follow. What's emf and eps?

Also, canvas uses an API -- not XML.
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby akujbida » Thu Sep 17, 2009 10:59 am

EMF is Enhanced MetaFile, a Microsoft vector image file format, and EPS is Encapsulated PostScript, also a vector image file format. If you do not know this, then there is very little chance you can understand this subject.

The API for creating canvasses is not connected to this subject. And who said anything about XML? It does not fit here either.

Are you qualified to implement this?
akujbida
<h6>
 
Posts: 2
Joined: Sun Jun 28, 2009 8:42 am

Postby mskinner » Thu Sep 17, 2009 12:09 pm

akujbida wrote:The API for creating canvasses is not connected to this subject. And who said anything about XML? It does not fit here either.
Are you qualified to implement this?


Quite clearly, you did:
akujbida wrote:it should be a simple matter to generate an emf or eps from canvas xml


akujbida wrote:Post subject: Canvas xml to create emf, eps, etc


If you wish to propose features, please consider making a post that answers the questions posed here: http://blog.whatwg.org/proposing-features
mskinner
<h2>
 
Posts: 116
Joined: Sun Jun 24, 2007 12:20 am
Location: Melbourne, Australia

Postby zcorpan » Fri Sep 18, 2009 8:06 am

Certainly it's quite possible to understand a subject regarding canvas and vector images without being familiar with all vector image formats.

Unless you're talking about something other than the canvas feature in HTML5, then the canvas API is very much connected to this subject since the API is basically all there is to the canvas feature.

The canvas API has a toDataURL method that defaults to exporting to PNG but some browsers also support exporting to JPEG. Exporting to a vector format like SVG or PDF or EMF or EPS requires the browser to keep track more state while drawing stuff with the canvas API, but it's certainly possible and the spec suggests that a UA could support exporting to SVG.

If you want this feature supported in browsers then I suggest you file a feature request to your browser vendor.

Since keeping state is more overhead than not keeping state, and is only necessary when the author wants to export to a vector image format, maybe there should be a new IDL attribute or method added to the 2d context interface that enables exporting to vector formats. But this would only be needed if browser vendors are interested in implementing exporting to vector image formats (and don't want the overhead without opt-in).
zcorpan
<article>
 
Posts: 807
Joined: Tue Feb 06, 2007 8:29 pm
Location: Sweden

Postby jdahan » Mon Jul 26, 2010 8:51 pm

It's possible to get EPS to canvas ... the company that I work for has been working a project for the last year to bring eps to canvas ... modify it (change colors, skew, transform, etc) then save it back as a new EPS file to send directly to printing.
jdahan
<h6>
 
Posts: 1
Joined: Mon Jul 26, 2010 8:42 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 2 guests