GithubHelp home page GithubHelp logo

moegirlconvert's Introduction

MoegirlConvert

用于 萌娘百科的图片缩略图转换

Rule

  • 如果是 png, jpg 或单页的 gif, 直接缩图加水印
  • 如果是 gif 动图且小于 10 帧,缩图也为 gif 动图并加水印
  • 如果是 gif 动图且大于 10 帧,将 gif 的第 1 帧缩图并加水印,并在右上角加上 gif 标志,提示此图点开为动图

使用方法

mgConvert.sh /path/source /path/destination width height /path/water

在 mediawiki 系统中,可以将 mgConvert.sh 用于 $wgCustomConvertCommand 变量并使用变量替换上面的参数,例如

$wgCustomConvertCommand = "/var/html/mediawiki/extensions/MoegirlConvert/mgConvert.sh %s %d %w %h /var/html/mediawiki/extensions/MoegirlConvert/water.png";

注意事项

  • convert 对内存需求比较大,应将 $wgMaxShellMemory 设置大一些
  • 需要给 mgConvert.sh 设置运行权限

moegirlconvert's People

Contributors

moemoefish avatar sakamoto-poteko avatar

Watchers

James Cloos avatar Gary Guo avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.