Search found 10481 matches

by snibgo
2018-08-13T10:42:49-07:00
Forum: MagickWand
Topic: convert multiple images to single pdf with library MagicWand
Replies: 1
Views: 42

Re: convert multiple images to single pdf with library MagicWand

Here's a wand program, but with no error-checking, that writes two images to a PDF: #include <MagickWand/MagickWand.h> int main(void) { MagickWandGenesis(); MagickWand *mw = NewMagickWand(); MagickReadImage(mw,"rose:"); MagickWand *aw = NewMagickWand(); MagickReadImage(aw,"toes.png"); MagickAddImage...
by snibgo
2018-08-13T04:44:29-07:00
Forum: IMagick
Topic: Set blending mode as "screen" and opacity to 50%
Replies: 4
Views: 59

Re: Set blending mode as "screen" and opacity to 50%

mjamal wrote:I need to know how to Set blending mode as "screen" for a single image...
I don't know what that means. If you set a blending mode for a single image, what do you expect to happen? Do you expect that this will change the image somehow?
by snibgo
2018-08-13T04:01:22-07:00
Forum: IMagick
Topic: Set blending mode as "screen" and opacity to 50%
Replies: 4
Views: 59

Re: Set blending mode as "screen" and opacity to 50%

At the command line, use "-compose Screen". In IMagick, the mode is a parameter of the compositeImage() function. See http://phpimagick.com/Imagick/compositeImage

To set opacity to anything, use "-evaluate set" at the command line, and evaluateImage() in IMagick.
by snibgo
2018-08-12T15:42:13-07:00
Forum: Users
Topic: I can't make this script to run in
Replies: 9
Views: 170

Re: I can't make this script to run in

1. Can I create a PDF file from the all pages I've just created in the code above using magick image code? If they all fit into memory at the same time: magick *.jpg out.pdf 2. Can I apply this type of code (the code from the 1st post) to a multiple page PDF file? I'm sick of spliting the PDF in mu...
by snibgo
2018-08-12T14:16:00-07:00
Forum: Users
Topic: I can't make this script to run in
Replies: 9
Views: 170

Re: I can't make this script to run in

As Fred says. I suggest you write your command using "magick" without "mogrify". When you have tested it, put it inside a "for" loop, eg "for %F in (*.jpg) do ....

Type "help for" for help.
by snibgo
2018-08-12T13:25:55-07:00
Forum: Users
Topic: Edit images of sub-folders in one attempt
Replies: 1
Views: 29

Re: Edit images of sub-folders in one attempt

You can use "for" to loop through directories, eg "for /R %D in (.) do ..."

Type "help for" for help.
by snibgo
2018-08-12T11:39:11-07:00
Forum: Magick.NET
Topic: How to make part of picture same during comparison
Replies: 2
Views: 81

Re: How to make part of picture same during comparison

diffImage tells you the difference is mostly vertical. Looking closely at the two inputs, we see there is a small (less than one pixel) displacement between the images. A small vertical blur eg -morphology Convolve Blur:0x1,90" smooths over that difference. diffImage tells you where differences are,...
by snibgo
2018-08-12T10:31:38-07:00
Forum: Users
Topic: I can't make this script to run in
Replies: 9
Views: 170

Re: I can't make this script to run in

In bash, parentheses () are special character so have to be escaped, and the bash escape character is backslash, so \( and \). Windows uses a different escape character, the caret ^ , and parentheses don't normally need to be escaped. In Windows BAT, percent % is a special character, and need to be ...
by snibgo
2018-08-12T07:42:03-07:00
Forum: Users
Topic: extracting biggest square from a rotated image
Replies: 3
Views: 61

Re: extracting biggest square from a rotated image

manit wrote:...but am not sure what should be the size of biggest black square...
My high-school geometry says that:

W' = W / (sin(A) + cos(A))

where W is the width and height of the unrotated square, W' is the width and height of the new square contained inside, and A is the angle of rotation.
by snibgo
2018-08-12T07:07:58-07:00
Forum: IMagick
Topic: Composite image onto image with transparency, ADD and BLEND not right
Replies: 5
Views: 79

Re: Composite image onto image with transparency causes rainbow colour distortion

Gimp's "Mode Normal" corresponds to IM's "-compose Over" so if you like the Gimp result, I suggest you use "-compose Over", in the same order as Gimp, with the river scene first then the kitchen photo. magick bRdUfVc.png Ymsusb9.png -background None -compose Over -layers Merge +repage out.png If I u...
by snibgo
2018-08-12T06:56:35-07:00
Forum: Users
Topic: ImageMagick hangs when resizing png files when running from an AWS Lambda
Replies: 7
Views: 102

Re: ImageMagick hangs when resizing png files when running from an AWS Lambda

I don't know what causes the problem, or the cure, but here are some thoughts. I see that you use /tmp as a location for your images. I suggest you use a different location, at least while solving this problem. I suggest you check you have plenty of free space in /tmp. Have you tried a command with ...
by snibgo
2018-08-11T22:52:13-07:00
Forum: IMagick
Topic: Composite image onto image with transparency, ADD and BLEND not right
Replies: 5
Views: 79

Re: Composite image onto image with transparency causes rainbow colour distortion

neekfenwick wrote:This works fine in The GIMP...
Okay, so how did you do it in Gimp?
by snibgo
2018-08-11T22:45:02-07:00
Forum: Users
Topic: Adjust exposure based on image metadata
Replies: 12
Views: 164

Re: Adjust exposure based on image metadata

Well, yes, for photogrammetry where you have a number of images with supposedly the same exposure (or they are normalised to the same exposure) you don't want any automatic adjustment of individual images. You want to treat them all the same. If an individual image looks dark, that doesn't matter, p...
by snibgo
2018-08-11T21:20:36-07:00
Forum: Users
Topic: Adjust exposure based on image metadata
Replies: 12
Views: 164

Re: Adjust exposure based on image metadata

You have dcraw "-4" option, which switches on "-W", which switches off the auto-brighten operation. Try "-6" instead of "-4". This will brighten the image so that 1% of the pixels are clipped. Alternatively, leave "-4", and auto-brighten in IM: $ for i in *.tiff; do magick "$i" -set colorspace RGB -...
by snibgo
2018-08-11T05:04:43-07:00
Forum: Users
Topic: Channel distortions - image processing basics
Replies: 1
Views: 48

Re: Channel distortions - image processing basics

"Distortion" is another word for "difference". The number in parentheses eg (0.034835) tells us how much difference there is: 0.0 means no difference, 1.0 means totally different. "-metric MAE" (see http://www.imagemagick.org/script/command-line-options.php#metric) calculates the mean of the absolut...