Developer forum

Forum » CMS - Standard features » GetImage and SVG

GetImage and SVG

Thomas Larsen
Reply

Hi,

Do GetImage supports SVG files?

BR
Thomas


Replies

 
Nicolai Pedersen
Reply

Hi Thomas

It can understand Vector stuff and also create thumbnails of i.e. PDFs. So to some extend it should be able to, but you have to test it. It cannot resize from SVG to SVG (Naturally, but not all understand the nature of SVG). If it can do it, it will resize (or create) a jpeg version of the SVG image. But you have to try it.

BR Nicolai

 
Thomas Larsen
Reply

Hi Nicolai,

I only need it to make a resized jpg versopn of the svg file. 

When testing with thus url /admin/public/getImage.ashx?Image=/Files/Billeder/ProductFeatures/Icons/Aplusplus.svg&height=400&width=400&format=jpg i get this error

 

[ArgumentException: Parameter is not valid.]
   System.Drawing.Image.FromStream(Stream stream, Boolean useEmbeddedColorManagement, Boolean validateImageData) +1402079
   Dynamicweb.Image.GetDimensionsFromFile(String filePath) +97
   Dynamicweb.Image.GetDimensions(String filePath) +230
   Dynamicweb.Admin.ProcessImageHandler.GetParameters() +2705
   Dynamicweb.Admin.ProcessImageHandler.ProcessRequest(HttpContext context) +25
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +508
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92
 
Nicolai Pedersen
Reply

ok.

There is some specific handling of some image types in DW that needs handling. that goes for PSD, AI and EPS files. Just added SVG to the same logic, TFS#41743, that may solve the problem.

Attached a 'pirate' version of Dynamicweb.Imaging.dll that has this included. Overwrite you local version and try it out. No guerantees.

BR Nicolai

 
Thomas Larsen
Reply

Thanks, but I forgot to mention  that this solution is running og the latest version of DW 8.9.

Can you helt with at quick fix on that?

BR
Thomas

 
Nicolai Pedersen
Reply

No new features on dw8... :-(

 

You must be logged in to post in the forum