Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic SVG image is not transformed (Read 6297 times)
Ivan K.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Jun 30th, 2021
SVG image is not transformed
Dec 6th, 2022 at 1:09am
Print Post  
Hi all! I have an issue with import of SVGs that contain images.
In continuation to this thread: https://mindfusion.eu/Forum/YaBB.pl?num=1661424075/3#3

If image has transform matrix - transformation is not applied on the resulting diagram. Could you please check?

Code
Select All
var svgNode = new SvgNode();
SvgContent content = new SvgContent();
content.Parse(@"D:/personal/img.svg");
svgNode.Content = content;
diagram.Nodes.Add(svgNode);
 



Please see attachments for details.
  

img.svg ( 40 KB | 44 Downloads )
svg_image_001.png ( 51 KB | 48 Downloads )
svg_image_001.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: SVG image is not transformed
Reply #1 - Dec 6th, 2022 at 8:42am
Print Post  
Hi,

This build applies image transform -
https://mindfusion.eu/_beta/wpfdiag39.zip

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Ivan K.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Jun 30th, 2021
Re: SVG image is not transformed
Reply #2 - Dec 7th, 2022 at 4:27am
Print Post  
It works. Thank you!
  
Back to top
 
IP Logged
 
nullable
Junior Member
**
Offline


I Love MindFusion!

Posts: 86
Joined: Aug 25th, 2022
Re: SVG image is not transformed
Reply #3 - Dec 9th, 2022 at 10:40am
Print Post  
Transform is working now, but it seems like opacities of the images cannot be parsed back to svgContent. Could you verify this?
  
Back to top
 
IP Logged
 
Ivan K.
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 9
Joined: Jun 30th, 2021
Re: SVG image is not transformed
Reply #4 - Dec 9th, 2022 at 11:30am
Print Post  
Hi team. Transform is working fine, but there is a problem with a quality of exported document.

If SvgNode.Content contains raster image, SVG exporter produces low-quality copy of it (see attached documents).

Could you please verify?

Code
Select All
var svgNode = new SvgNode();
SvgContent content = new SvgContent();
content.Parse(@"D:/personal/img.svg");
svgNode.Content = content;
diagram.Nodes.Add(svgNode);

var exporter = new SvgExporter();
var ms = new MemoryStream();
exporter.InvisibleItems = false;
exporter.Export(diagram, "result.svg");
 



  

diff.png ( 52 KB | 35 Downloads )
diff.png
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3154
Joined: Oct 19th, 2005
Re: SVG image is not transformed
Reply #5 - Dec 12th, 2022 at 5:45pm
Print Post  
Try this build for image quality -
https://mindfusion.eu/_beta/wpfdiag39.zip

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint