LinuxTOY 是一个致力于提供 Linux 相关资讯的专题站点。如果您发现了好用好玩的 Linux 东东并愿意发扬自由、分享的精神,可以点击顶部导航 Contact 按钮进行投稿。

Related entries

  • No related posts

Mosait:制作马赛克效果的拼图

Mosait 是一个颇有意思的命令行小程序。使用 Mosait,你可以将一幅图片转换成具有马赛克效果的拼图。即便原图片再平常不过,经过 Mosait 的处理,也变得饶有趣味起来。

编译 Mosait

在使用 Mosait 之前,你需要从源代码编译它。Mosait 要求 freeimageplus 库,在准备好之后,只需执行下载、解包、make 等步骤即可。

Mosait 用法

要使用 Mosait 制作拼图,首先你需要建立一个图片数据库。这可以通过执行以下命令完成(假设你的图片都保存在 images 目录中):

mosait -c images/ -o images.db

接着,我们就可以使用 Mosait 制作具有马赛克效果的拼图啦:

mosait -d images.db -i srcimage.jpg -o mymosaic.jpg

上述指令中的 srcimage.jpg 为原图,mymosaic.jpg 为输出后的图片,你需要使用自己的图片名称替换。

例如,名画《蒙娜丽纱的微笑》经过 Mosait 处理后,其效果如下图所示:

joconde-mosaic 点击可放大

Mosait

署名 • 注明出处 • 非商业性使用

9 Comments

  1. 1 lilei Commented @ 2008-08-22 9:25 amReply to this comment

    thx looks funny

  2. 2 waakee.com Trackbacked @ 2008-08-22 9:30 amReply to this comment

    Mosait:制作马赛克效果的拼图 — LinuxTOY...

    Mosait 是一个颇有意思的命令行小程序。使用 Mosait,你可以将一幅图片转换成具有马赛克效果的拼图。即便原图片再平常不过,经过 Mosait 的处理,也变得饶有趣味起来。 编译 Mosait 在使用 Mosa...

  3. 3 ee Commented @ 2008-08-22 10:41 amReply to this comment

    小图拼大的,有点意思。

  4. 4 pig345 Commented @ 2008-08-22 1:08 pmReply to this comment

    没给个连接?

  5. 5 dogfox Commented @ 2008-08-22 3:56 pmReply to this comment

    仔细看就像是一堆乐涩堆砌出的蒙娜丽莎

  6. 6 Toy Commented @ 2008-08-22 6:29 pmReply to this comment

    @pig345: 在文末。

  7. 7 zhg Commented @ 2008-08-23 10:44 amReply to this comment

    很用意思,这样就可以做一个很个性的圖标

  8. 8 Ivan Chen(西滨) Commented @ 2008-08-24 9:00 amReply to this comment

    建立images.db的时候,出现错误: terminate called after throwing an instance of 'std::iosbase::failure' what(): basicfilebuf::underflow error reading the file 忽略

  9. 9 tangui Commented @ 2008-08-26 6:55 amReply to this comment

    The bug is now corrected in the lastest version of mosait.

    (sorry, i dont speak chinese)