Image elements

Coordinator
Feb 10, 2009 at 4:27 PM
I was wondering if there is/is planned support for the SVG <image> tag?
Coordinator
Feb 11, 2009 at 1:12 AM
I'd like to get support in there, and I don't imagine it will be overly difficult either. I can't say when it will be there but hopefully soon.

Cheers,
Dave
Coordinator
Feb 25, 2009 at 8:24 PM
Hey Dave!

Thanks for the reply. The project I'm working on is going to need this functionality, so if you are thinking you might not have time for awhile yet, if you can give me a quick pointer in the right direction, I'll work on implementing it and send the patch your way!

All I'd need is a basic "I'd create the basic shape here, and add this decoration to the file there to make it show up in the serialize/deserialize process" and I should be able to take it from there.

You can contact me off the forum at jvenema at gmail dot com if you want.

-Jerod
Coordinator
Feb 26, 2009 at 4:33 PM
Hey Dave,

I've just added (basic) image support (I haven't added the "preserveAspectRatio" option, but everything else is in). I'll be adding the "path" element as well. What do you think about perhaps working together on this? I'll send you what I've got now if you're interested in taking a look at my code first.

-Jerod
Coordinator
Feb 27, 2009 at 1:00 AM
Hi Jerod!

It's good you got the <image/> element going - I didn't imagine it to be too much work to get a basic version going. Send in a patch or raise a work item with an attachment and we'll see about getting it into the code-base ASAP. It's a good one to have.

Re. the <path/> element there is already some really decent support there for it - are you having issues with it?

Cheers,
Dave
Coordinator
Feb 27, 2009 at 2:02 PM
Hey Dave,

Nope, that was my mistake, paths looks good :). I just didn't see them at first.

I'll send along the <image/> support, and also a couple other minor additions; I've added support for "TransformedBounds" on all elements, which allowed me to get the transformed bounds on the document, which in turn means you can "trim" the image to remove any excess space. Handy for what I'm working on, I bet others could use it as well. It's implemented as Draw(int padding) which draws the image trimmed, with a [padding] width of spacing (so you don't have to trim right to the edge).

Two new work items:
#9367 - image element
#9368 - support for getting the transformed element sizes and trimming the document on draw

Thanks for the work Dave, great library :)

-Jerod
Sep 16, 2009 at 4:47 PM

Any updates on incorporating the image element in the main project?  

Oct 25, 2011 at 5:37 PM

Any news on image element support yet? I've been trying out this library and it's really great but image support would add a useful extra.

I use dynamic svg elements created using .net handler files in web pages for charting and GIS applications and I'm looking for a way to offer raster image file alternatives and even incorporate them into PDF exports.  The lack of image element support has meant I've hit a stumbling block when I try to convert SVG files containing map tile raster images.

I've looked at the code posted in the work item #9367 but, at first viewing, it would appear a transforms library is missing (FM.Iceflow.Drawing.Svg.Transforms).

Many thanks.

Triss

Coordinator
Oct 26, 2011 at 12:40 AM
Edited Oct 26, 2011 at 12:40 AM

You should be able to use #9367; ignore the fact that it's got the FM.Iceflow.Drawing prefix on the namespace for Transforms, I renamespaced it for consistency with the rest of the project. You should be able to just use Svg.Transforms"

Oct 31, 2011 at 10:30 PM

Managed to get #9367 added to source, re-compiled and working very quickly without the transforms and the results are great.  I'll have a go at what you suggest re SvgTransforms but it's not an immediate requirement.

Many thanks for getting back to me.

Triss

Nov 25, 2011 at 4:23 PM

could you please detail the steps you took to get SvgImage.cs added to the source code, recompiled, and working.

Mar 3, 2012 at 8:31 AM
trisskenny wrote:

Managed to get #9367 added to source, re-compiled and working very quickly without the transforms and the results are great.  I'll have a go at what you suggest re SvgTransforms but it's not an immediate requirement.

Many thanks for getting back to me.

Triss


Hi Triss,

 

Could you tell me where you got #9367 patch? somehow I do not see it in the patches of the source code.

Thanks in advance, Vincent.

 

Oct 24, 2012 at 4:51 PM

+1 to Vincent's request, my project needs the Image tag handling as well and it isn't available in the current codebase, how can we get access to that change?

George

Coordinator
Oct 26, 2012 at 1:53 PM

It's actually a work item:

http://svg.codeplex.com/workitem/9367

I'll try and pull in some of the outstanding patches/work items this weekend.