imagemagick - How can I trim an image using Magick.net keeping clipping paths if they exist -


when trimming images magick.net (to remove white areas around main object of image) , they've got clipping path, path not synchronized new proportions of image.

looking @ image path selected, in photoshop, after trim has been performed

is there way handle using magick.net, path still trace objects did before trimming?

(magick.net uses imagemagick image processing, if knows how in imagemagick, perhaps it's "translated" magicknet.)

adding more information: here link simple image clipping path in (i made few strokes in photoshop , made path): zip archive sample files in different formats, containing paths.

and below find piece of code uses magic.net trimming image, resulting displacement of path.

// put reference magick.net-q8-anycpu using "nuget"

using imagemagick; using system; namespace consoleapplication2 {     class program     {         static void main(string[] args)         {             string path = @"c:\temp\path-test-jpg.jpg";             magicknet.setghostscriptdirectory(@"c:\temp\consoleapplication2\bin\debug");             using (magickimage image = new magickimage(path))             {                 // dpi                 console.writeline(image.density);                 //// trim                 image.trim();                  image.quality = 99;                  image.write(@"c:\temp\test-out.jpg");             }         }     } } 

enter image description here


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -