Search found 13 matches

by Mihamix
2018-02-06T14:22:28-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

OK. Here is my code in unix syntax for the first image magick \ \( /Users/fred/desktop/PZImages/WM_m.png \ -set option:dim "%[fx:(w>h)?650*w/h:650]x%[fx:(w>h)?650:650*h/w]" -resize "%[dim]" \) \ \( /Users/fred/desktop/PZImages/original/17201-33020@02.jpg -print "%f\n" ...
by Mihamix
2018-02-06T13:16:09-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

I cannot access your posted image. If from dropbox, it needs to made sharable. Pad which image? The watermark or the background? Do you need to adjust the background to have the same aspect as the watermark? Is that this issue? The image is sharable... Here is a different link. The original image (...
by Mihamix
2018-02-06T10:27:26-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

You have several issues. First the -fuzz needs to come before -trim. Then you need +repage after -trim. But the main issue is that your watermark image does always have an appropriate aspect ratio to conform to the trimmed background image. If you need it to fill the width as well, then the resize ...
by Mihamix
2018-02-04T12:03:54-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

Is your output on another volume? Did you post your watermark image so I can use it to test . If I pad with white, then it will cover your background image. So I pad with transparency Again if you post your watermark image, I can test the equivalent command in unix. Sorry, I've uploaded it, but did...
by Mihamix
2018-02-04T01:05:18-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

Try this magick Source\Original\yourimage -print "%f\n" -trim -fuzz "10%" -background "white" -set option:dim "%wx%h" -resize "%[dim]" -rotate "90<" ( Watermarks\wm.png -resize "%[dim]" -background none -gravity center -extent &q...
by Mihamix
2018-02-04T00:50:42-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

Is your output on another volume? Did you post your watermark image so I can use it to test . If I pad with white, then it will cover your background image. So I pad with transparency Again if you post your watermark image, I can test the equivalent command in unix. Sorry, I've uploaded it, but did...
by Mihamix
2018-02-03T16:26:45-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

Can you provide the watermark image? How do you want it to fit to the size of the background. That is, what do you want to happen when the aspect ratio of the watermark image is different from that of the background image? Should it distort to fit exactly to the background size, enlarge so that max...
by Mihamix
2018-02-03T14:17:41-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

I think you are going to have to post an example set of input and output images and explain what is wrong and what you need. We need to see the problem to understand better. You can upload images to any free hosting service that does not change the image or format, such as dropbox.com, and put the ...
by Mihamix
2018-02-03T04:54:47-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Re: Making sure image has at least given dimensions after resize

With mogrify, you will have to preprocess the background image first to do the trim, resize and rotate. Then get its dimensions. The resize the overlays image to some fraction of the size of the processed background image. In IM 7, if you write a script loop over each image to be processed, then yo...
by Mihamix
2018-01-31T14:33:58-07:00
Forum: Users
Topic: Making sure image has at least given dimensions after resize
Replies: 18
Views: 7609

Making sure image has at least given dimensions after resize

Hi, I have to provide a windows batch script to handle the autocropping, resizing, potentially rotating and finally applying watermark image on of 5000+ images. The problem is that the watermark logo is sometimes bigger than the autcropped & resized image, resulting in hideously cropped watermar...
by Mihamix
2018-01-27T17:11:00-07:00
Forum: Users
Topic: Consuming output from -print
Replies: 5
Views: 8258

Re: Consuming output from -print

Wrote the class library, ... Perhaps that gives a clue. Is your library buffered output? If it is, try flushing the buffer. I see what you say, but I'm not sure if I have missed something... Could be... This is the code snippet starting up the process imageProcess = new Process(); imageProcess.Star...
by Mihamix
2018-01-27T16:54:25-07:00
Forum: Users
Topic: Consuming output from -print
Replies: 5
Views: 8258

Re: Consuming output from -print

-print or -format %... info: can list string formats or %[fx:...] expressions. See https://www.imagemagick.org/script/escape.php and https://www.imagemagick.org/Usage/transform/#fx. If you want to list filenames see %f. But to get a progress, I would recommend writing a script loop over each image ...
by Mihamix
2018-01-27T15:34:49-07:00
Forum: Users
Topic: Consuming output from -print
Replies: 5
Views: 8258

Consuming output from -print

Hi All, I'm trying to process folders containing jpg using mogrify to autocrop, resize, rotate if needed and apply watermark to them - on the server side in a client-server context. However, as folders contain several thousands of high-res images it takes quite some time - therefore I need to provid...