ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Convert Png to SVG
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Ken Randall

61 Posts

Posted - Mar 03 2025 :  11:45:42  Show Profile  Reply
Hi Nigel,

Can ImageEn do this?

Thanks,

Ken

Ken R

xequte

38899 Posts

Posted - Mar 04 2025 :  16:02:08  Show Profile  Reply
Hi Ken

Yes, but PNG is a raster format whereas SVG is a vector format that can include raster objects, so a PNG saved to SVG will just create a SVG with a raster PNG image in it.

Please see:

http://www.imageen.com/help/IEConvertImageToSVG.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

61 Posts

Posted - Mar 05 2025 :  02:23:32  Show Profile  Reply
Thanks but need it to be vectorized.

Ken R
Go to Top of Page

xequte

38899 Posts

Posted - Mar 05 2025 :  21:58:35  Show Profile  Reply
Hi Ken

Turning an image into vectors is a technically difficult task, at best you can do something like edge detection, but that is only suitable for a small subset of images. Perhaps it will be a task that AI can do reasonably in the near future.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38899 Posts

Posted - Mar 06 2025 :  22:21:17  Show Profile  Reply
Hi Ken

I started writing an outline of the steps to create a method to do this with ImageEn, before I decided it would probably easier just to code it myself. Please email me for the latest beta and a demo.

It's not great nor fast, and could do with lots of improvement, but it works reasonably well.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38899 Posts

Posted - Mar 06 2025 :  22:23:01  Show Profile  Reply
JPEG:


SVG (Reduced to 32 colors):



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

xequte

38899 Posts

Posted - Mar 06 2025 :  22:24:35  Show Profile  Reply
PNG:


SVG (Reduced to 32 colors):


SVG (Reduced to 256 colors):


Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

61 Posts

Posted - Mar 07 2025 :  02:59:25  Show Profile  Reply
Hi Nigel,

That's brilliant. I have sent an email as requested.

Thanks,

Ken

Ken R
Go to Top of Page

xequte

38899 Posts

Posted - Mar 07 2025 :  20:09:55  Show Profile  Reply
Hi Ken

I don't know about brilliant. Turning a raster image into SVG only works agreeably when there a few colors. Otherwise it creates an image that is bigger, uglier and slower than the original.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page

Ken Randall

61 Posts

Posted - Mar 08 2025 :  02:49:51  Show Profile  Reply
Brilliant for me as the images are for buttons.

Ken R
Go to Top of Page

xequte

38899 Posts

Posted - Mar 17 2025 :  23:29:00  Show Profile  Reply
// Convert a logo to PNG
IEVectorizeImageToSVG( ImageEnView1.IEBitmap, 'D:\CC.svg', 4, 7, -1, 0, 0.9, 0 );


Source File Size: 35 KB


SVG File Size: 11 KB


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: