## Search found 92 matches

- 2018-09-12T08:39:43-07:00
- Forum: Users
- Topic: mixing colors in image magick
- Replies:
**2** - Views:
**97**

### Re: mixing colors in image magick

That works. convert -size 510x340 canvas:white blank.png convert blank.png -fill orange -draw 'circle 170,170 340,170' blank.png convert blank.png -fill 'rgba(0,0,100%,0.5)' -draw 'circle 340,170 510,170' blank.png h t t p s : / / i b b . c o / e D V Z C 9 (can't post images) Do you suggest any othe...

- 2018-09-12T06:57:59-07:00
- Forum: Users
- Topic: mixing colors in image magick
- Replies:
**2** - Views:
**97**

### mixing colors in image magick

Here , '<color> circle' denotes circle filled with color <color> I have an image with orange circles. Now I want to draw blue circles on that image such that wherever blue overlaps with orange , i should get brown. I want to do this via command line because my aim is to study regions of overlap. Whe...

- 2018-09-12T06:39:33-07:00
- Forum: Users
- Topic: new coordinates of a point after image rotation
- Replies:
**12** - Views:
**642**

### Re: new coordinates of a point after image rotation

The basic formulae are: new_width = w*cos(ang) + h*sin(ang) new_height = h*cos(ang) + w*sin(ang) I think IM rounds these up to the nearest integers ("ceiling"), and adds 2. 512 * (cos15 + sin 15) = 627.06 So , I will try to find correspondence for a point in 512x512 image to its 15 degree rotated (...

- 2018-09-05T08:43:30-07:00
- Forum: Users
- Topic: new coordinates of a point after image rotation
- Replies:
**12** - Views:
**642**

### Re: new coordinates of a point after image rotation

The basic formulae are: new_width = w*cos(ang) + h*sin(ang) new_height = h*cos(ang) + w*sin(ang) I think IM rounds these up to the nearest integers ("ceiling"), and adds 2. 512 * (cos15 + sin 15) = 627.06 So , I will try to find correspondence for a point in 512x512 image to its 15 degree rotated (...

- 2018-09-04T06:31:08-07:00
- Forum: Users
- Topic: new coordinates of a point after image rotation
- Replies:
**12** - Views:
**642**

### Re: new coordinates of a point after image rotation

I am running following command

convert fp.png -rotate 15 fp-rotated-15degree.png

In this case fp.png is 512x512 (https://ibb.co/f8YvZe) while fp-rotated-15degree.png turns out to be 630x630 (https://ibb.co/dST7fK) .

convert fp.png -rotate 15 fp-rotated-15degree.png

In this case fp.png is 512x512 (https://ibb.co/f8YvZe) while fp-rotated-15degree.png turns out to be 630x630 (https://ibb.co/dST7fK) .

- 2018-09-03T01:30:00-07:00
- Forum: Users
- Topic: new coordinates of a point after image rotation
- Replies:
**12** - Views:
**642**

### Re: new coordinates of a point after image rotation

I saw that rotating by multiple 90 degrees is most simple case which I have verified. But when image is rotated by any other agnle then rotated image has higher dimension than original one . In that case , what should be formula for new dimension of image ? Also , is it that I have to subtract width...

- 2018-09-02T06:45:42-07:00
- Forum: Users
- Topic: new coordinates of a point after image rotation
- Replies:
**12** - Views:
**642**

### Re: new coordinates of a point after image rotation

I get that a pixel in original image defined by an integer won't necessarily map to another integer coordinate . I think if image is square shape and rotation angle is 90 degrees then i will get integer coordinates . In other cases i am okay with slight error . I don't want to skew the image just si...

- 2018-09-01T22:40:03-07:00
- Forum: Users
- Topic: new coordinates of a point after image rotation
- Replies:
**12** - Views:
**642**

### Re: new coordinates of a point after image rotation

(Question 1)Can i say that first pixel on top left of image is regarded as 0,0 in image magick . and horizontal axis is x while vertical is y , so bottom right pixel of a 512x512 image will be (511,511)? (Question 2)Now when I run the command convert input_image.png -rotate n rotated_image.png where...

- 2018-08-31T09:35:00-07:00
- Forum: Users
- Topic: new coordinates of a point after image rotation
- Replies:
**12** - Views:
**642**

### new coordinates of a point after image rotation

Consider an image of breadth 'b' pixel and length 'l' pixel. If this image is rotated clockwise by angle theta then coordinates of point (x,y) become (x cos theta - y sin theta , y cos theta + x sin theta). For an image where each x,y is an integer such that x belongs to {0,1,...,b-1} and y belongs ...

- 2018-08-20T08:08:32-07:00
- Forum: Users
- Topic: extracting biggest square from a rotated image
- Replies:
**18** - Views:
**1658**

### Re: extracting biggest square from a rotated image

- 2018-08-20T07:11:35-07:00
- Forum: Users
- Topic: extracting biggest square from a rotated image
- Replies:
**18** - Views:
**1658**

### Re: extracting biggest square from a rotated image

I am beginning to think that it works as follows convert f0001_01.png -rotate -15 rotated.png Then convert rotated.png -rotate 15 -set option:leg "%[fx:512/(cos(15*(pi/180))+sin(15*(pi/180)))]" -set option:distort:viewport "%[leg]x%[leg]" \( -clone 0 -distort srt 0 \) -gravity center +swap -composit...

- 2018-08-20T06:57:49-07:00
- Forum: Users
- Topic: extracting biggest square from a rotated image
- Replies:
**18** - Views:
**1658**

### Re: extracting biggest square from a rotated image

ok . Here is the original 512x512 image -> https://ibb.co/cneSfz Then I ran this command convert f0001_01.png -rotate 15 -set option:leg "%[fx:512/(cos(15*(pi/180))+sin(15*(pi/180)))]" -set option:distort:viewport "%[leg]x%[leg]" \( -clone 0 -distort srt 0 \) -gravity center +swap -composite output....

- 2018-08-17T06:08:09-07:00
- Forum: Users
- Topic: extracting biggest square from a rotated image
- Replies:
**18** - Views:
**1658**

### Re: extracting biggest square from a rotated image

$ file f0001_01.png f0001_01.png: PNG image data, 512 x 512, 8-bit grayscale, non-interlaced $ convert f0001_01.png -rotate 15 -set option:leg "%[fx:512/(cos(15*(pi/180))+sin(15*(pi/180)))]" -set option:distort:viewport "%[leg]x%[leg]" \( -clone 0 -distort srt 0 \) -gravity center +swap -composite ...

- 2018-08-16T08:31:18-07:00
- Forum: Users
- Topic: extracting biggest square from a rotated image
- Replies:
**18** - Views:
**1658**

### Re: extracting biggest square from a rotated image

to GeeMack , $ file f0001_01.png f0001_01.png: PNG image data, 512 x 512, 8-bit grayscale, non-interlaced $ convert f0001_01.png -rotate 15 -set option:leg "%[fx:512/(cos(15*(pi/180))+sin(15*(pi/180)))]" -set option:distort:viewport "%[leg]x%[leg]" \( -clone 0 -distort srt 0 \) -gravity center +swap...

- 2018-08-16T07:08:09-07:00
- Forum: Users
- Topic: extracting biggest square from a rotated image
- Replies:
**18** - Views:
**1658**

### Re: extracting biggest square from a rotated image

Actually , I know the dimension of original image and angle by which it has to be rotated .