Search found 54 matches

by jmaeding
2018-01-11T11:28:00-07:00
Forum: Users
Topic: Trim images with polygon and combine
Replies: 27
Views: 16639

Re: Trim images with polygon and combine

Good idea. How about we just see if we can get two images to work, so 1 row of 2 images. So just trimming one image works correct. I get the logo with a white border. When I added the 1st additional image, it almost behaved, but the distort did not shift the image -90 pixels like I expected. It did ...
by jmaeding
2018-01-11T10:39:39-07:00
Forum: Users
Topic: Trim images with polygon and combine
Replies: 27
Views: 16639

Trim images with polygon and combine

I want to take several images, trim each by some polygon, and paste them together at various locations. To make the simplest example I could, take logo.jpg, trim to a 90x90 square, and put 4 of them together to form a 2x2 tiles square. In my example, the first "tile" stays put, it is not m...
by jmaeding
2018-01-11T09:52:10-07:00
Forum: Users
Topic: IM on CMD WORKS but not .NET program
Replies: 2
Views: 3094

Re: IM on CMD WORKS but not .NET program

I use .net with IM for many things, and run it through the ole object (com) like: ImageMagickObject.MagickImage img = new ImageMagickObject.MagickImage(); object ret1 = img.Convert(argsall.ToArray()); where argsall is an array of strings which are the parameters. You need to add the ImageMagickObjec...
by jmaeding
2017-09-22T14:50:13-07:00
Forum: Users
Topic: get verbose return using com object and .net
Replies: 4
Views: 4371

Re: get verbose return using com object and .net

btw, this likely is the same code with just one layer involved: "magick.exe" ^ "C:\Users\james\Desktop\Kir\granite.png" ^ -alpha set -virtual-pixel white +distort Affine "0,0 0,0 128,0 128,0 128,128 200,128" -format "%%H,%%W,%%X,%%Y" -write info: ^ +repage ^ &...
by jmaeding
2017-09-22T14:48:11-07:00
Forum: Users
Topic: get verbose return using com object and .net
Replies: 4
Views: 4371

Re: get verbose return using com object and .net

ok, so I did some experiments, I think we are close. The good thing I found is -write info: does seem to affect the return string from IM com object, but I hit a catch... My test code is like this for windows dos batch: "magick.exe" ^ ( "C:\Users\james\Desktop\Kir\granite.png" ^ ...
by jmaeding
2017-09-22T12:06:21-07:00
Forum: Users
Topic: get verbose return using com object and .net
Replies: 4
Views: 4371

Re: get verbose return using com object and .net

shoot, ignore the:
DoProgress("Rubbersheeting...");
code, that is my progress bar thing, not related to IM com object.
by jmaeding
2017-09-22T12:04:38-07:00
Forum: Users
Topic: get verbose return using com object and .net
Replies: 4
Views: 4371

get verbose return using com object and .net

I have been using C# (on windows) to run the imagemagick com object for years now, and it works so well. Recently, I needed to know how much the virtual canvas "expanded" when I did a 4 point affine distort. The easy answer is to add -verbose and look at the output. That works fine when te...
by jmaeding
2017-08-30T13:29:10-07:00
Forum: Users
Topic: Mask using polygon, then crop to known coordinates
Replies: 8
Views: 7815

Re: Mask using polygon, then crop to known coordinates

btw, I just noticed another issue that may have been fooling me in tests.
When you do a windows batch, and use ^ for line continuation, you must add a space at beginning of next line.
Programmers expect "white space" to be irrelevant, so that one bit me today pretty good.
by jmaeding
2017-08-30T09:55:23-07:00
Forum: Users
Topic: Mask using polygon, then crop to known coordinates
Replies: 8
Views: 7815

Re: Mask using polygon, then crop to known coordinates

oh wow, I hit the Launch button instead of the Lunch button and ended up on the moon....(Far Out Space Nuts...)
That would have been funny if I was testing on some larger images.
by jmaeding
2017-08-30T09:07:57-07:00
Forum: Users
Topic: Mask using polygon, then crop to known coordinates
Replies: 8
Views: 7815

Re: Mask using polygon, then crop to known coordinates

Sorry, I should have said - it outputs 4 images...but.... I just retested my own code, the one in my post with the -crop, and it works now. As I wrote the post, I added +0+0 to the crop statement just to be more explicit. I had never tested that as I thought the default was no shift on crop rectangl...
by jmaeding
2017-08-29T18:07:00-07:00
Forum: Users
Topic: Mask using polygon, then crop to known coordinates
Replies: 8
Views: 7815

Mask using polygon, then crop to known coordinates

A while back, I got some great help here understanding how to merge images. I am on a simpler task now, which is to mask out pixels using a polygon, then crop that to a known rectangle. I have this (runs as windows batch file) and it works, but does not crop as I did not tell it to yet: "C:\Pro...
by jmaeding
2017-03-30T13:07:49-07:00
Forum: Users
Topic: Clip image and paste into another in one step?
Replies: 23
Views: 15064

Re: Clip image and paste into another in one step?

ok, seems this works too, without cropping and the background setting too: "C:\Program Files\ImageMagick-7.0.5-Q16\magick.exe" ( ^ "C:\Users\james\Desktop\Kir\granite.png" ^ ( "C:\Users\james\Desktop\Kir\navy.png" -alpha set -virtual-pixel transparent -define distort:vi...
by jmaeding
2017-03-30T11:55:39-07:00
Forum: Users
Topic: Clip image and paste into another in one step?
Replies: 23
Views: 15064

Re: Clip image and paste into another in one step?

ok, I'm a bonehead. I used -composite instead of -layers merge...deet-tuh-deeeee I switched, and added cropping to get: "C:\Program Files\ImageMagick-7.0.5-Q16\magick.exe" ( ^ "C:\Users\james\Desktop\Kir\granite.png" ^ ( "C:\Users\james\Desktop\Kir\navy.png" -alpha set ...
by jmaeding
2017-03-30T10:32:15-07:00
Forum: Users
Topic: Clip image and paste into another in one step?
Replies: 23
Views: 15064

Re: Clip image and paste into another in one step?

Thanks for the comments Snibgo! I have had great results in terms of performance, on my largest images (30kx40k pixels). Less than 1 minute processing times and no memory issues. I did realize, though, that I was not dealing with distort cords that rotated the paste image in my tests. I had simple o...
by jmaeding
2017-03-29T16:00:16-07:00
Forum: Users
Topic: Clip image and paste into another in one step?
Replies: 23
Views: 15064

Re: Clip image and paste into another in one step?

I got it all working into one statement. The three parts were: 1) to make mask "C:\Program Files\ImageMagick-7.0.5-Q16\magick.exe" -size 2160x1440 xc:black -fill white -stroke black -draw "polygon 447.72,217.87 232.29,702.26 964.73,1116.68 1578.69,1138.21 1917.98,449.3 1761.8,34.88 76...