How to get mosaic view of an image...?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
ziasumo

How to get mosaic view of an image...?

Post by ziasumo »

How I can get Mosaic view of a given image
like
After output image should be like
Image

But before the image should be single image without splitting rows and colomns...

Is there any single command to get such result...?

Thanks in anticipation
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get mosaic view of an image...?

Post by fmw42 »

you can use -draw to draw lines where you want. see http://www.imagemagick.org/Usage/draw/

I have a unix bash script, grid, that adds a regular set of grid lines. see below
ziasumo

Re: How to get mosaic view of an image...?

Post by ziasumo »

But -draw will draw a line on image and line width will occupy the image.
I actually want to fcreate an image like to create space on image and then draw lines on it.
Can you suggest me something.
or if you did not get my point.
then I will try to explain it again...

Thanks
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get mosaic view of an image...?

Post by fmw42 »

you said you did not want to split rows and columns. but it now appears that is what you really want to do. so see -splice at http://www.imagemagick.org/Usage/crop/#splice

If I misunderstand, then please clarify further.


You can also do -crop into multiple sections and then flatten (composite) the pieces on a larger background color.

see http://www.fmwconcepts.com/imagemagick/ ... .php#crop2 and http://www.imagemagick.org/Usage/crop/#crop_tile and http://www.imagemagick.org/Usage/crop/#crop_equal
ziasumo

Re: How to get mosaic view of an image...?

Post by ziasumo »

Thank you very much...
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get mosaic view of an image...?

Post by fmw42 »

you are welcome. let us know how it works out and what method you used.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get mosaic view of an image...?

Post by fmw42 »

Here is probably the quickest and simplest way.

Image

#put 2 pixel black border between cells and around outside
convert fish.jpg -crop 3x3@ +repage miff:- |\
montage - -background black -tile 3x3 -geometry +2+2 miff:- |\
convert - -bordercolor black -border 2 fish_mosaic.jpg


Image
ziasumo

Re: How to get mosaic view of an image...?

Post by ziasumo »

Thanks for cooperation.
I did not used it yet.
That is the near future task most probably. So I am already prepare waiting for the boss acknowledgment.
I think I will prefer to use -splice.

Thanks
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to get mosaic view of an image...?

Post by snibgo »

@ftw42:

Code: Select all

convert fish.jpg -crop 3x3@ ...
This "@" switch on crop, which seems to divide into equal portions, is new to me. I can't find it documented anywhere. Is it?
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get mosaic view of an image...?

Post by fmw42 »

snibgo wrote:@ftw42:

Code: Select all

convert fish.jpg -crop 3x3@ ...
This "@" switch on crop, which seems to divide into equal portions, is new to me. I can't find it documented anywhere. Is it?
see http://www.imagemagick.org/Usage/crop/#crop_equal
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to get mosaic view of an image...?

Post by snibgo »

Ah, thanks. I've only just upgraded from 5.8. All these wonderful new toys! (Sorry for calling you "ftw".)
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get mosaic view of an image...?

Post by fmw42 »

Sorry for calling you "ftw".
I had not even noticed. But it is appropriate (fourier transform weinhaus --- ftw)

5.8 is really very very very very old!

But yes, it is really a good idea to try to keep up with the new IM releases. I try to stay current with the latest release. New features and bug fixes get added all the time.

Fred
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to get mosaic view of an image...?

Post by snibgo »

Did I say 5.8? I meant 6.5.8.

I've wanted 6.6 for a while, but I've been working on a project with a climax/demo last Friday. Everything had to work exactly as rehearsed with no surprises whatsoever, apart from my fluff-ups of course.

http://www.imagemagick.org/script/comma ... ptions.php under "crop" doesn't mention the "@", nor does http://www.imagemagick.org/script/comma ... p#geometry, nor do they point to that rather useful crop page.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: How to get mosaic view of an image...?

Post by fmw42 »

snibgo wrote:Did I say 5.8? I meant 6.5.8.

I've wanted 6.6 for a while, but I've been working on a project with a climax/demo last Friday. Everything had to work exactly as rehearsed with no surprises whatsoever, apart from my fluff-ups of course.

http://www.imagemagick.org/script/comma ... ptions.php under "crop" doesn't mention the "@", nor does http://www.imagemagick.org/script/comma ... p#geometry, nor do they point to that rather useful crop page.

It is special for -crop that Anthony wrote while in China. I don't think it relates to -geometry, but should be added to the -crop part of the options page. I suspect he is behind in getting everything documented as he is likely still getting caught up at work and home since getting back.
Post Reply